StackOverflowGitterNotifier.jl
Running
Run with
julia src/stackoverflow2gitter.jl SO http://www.stackoverflow.com julia-lang https://webhooks.gitter.im/e/a9a6a5f25..
- 1st arg is the Prefix, which is shown in the activity bar
- 2nd is the site to query, anything for the stack exchange network should work
- 3rd is that tag to track
- 4th is the Webhook URL you get from the Gitter, Notifications -> Custom integration. Note that to get/create this URL you need to be a admin for the Gitter Channel
Each time the script is run, it will push any new questions with the tag, to the gitter webhook URL.
Run the script using cron, or a similar schedualler, eg every 5 minutes:
by adding to your crontab (using contab -e
) something like:
*/5 * * * * /home/ubuntu/.julia/v0.5/StackOverflowGitterNotifier.jl/src/example_run.sh >> /home/ubuntu/.julia/v0.5/StackOverflowGitterNotifier.jl/runlog.log 2>&1
Installation
- Install Julia (either v0.4 (old-stable), or v0.5 (stable)
- start the julia REPL by running
julia
- install this package and it's dependencies by running
Pkg.clone("https://github.com/oxinabox/StackOverflowGitterNotifier.jl")
in the REPL - Wait while the while the required HTTP libraries etc are downloaded and installed (you should see a running log)
- This repo should be installed into
~/.julia/<vX.Y>/StackOverflowGitterNotifier.jl
where<vX.Y>
is etherv0.4
orv0.5
depending on the julia versionm you are running. cd
to that directory and runbash example.sh
to check it is working, this should first compile some of the depencencies (if this is the first time running it), then give a warning that itFailed to load Last checked.
(which is fine since there is no last checked date). Finally it should start listing questions it is sending to gitter -- don't worry these are not going anywhere as the example URL is bogus.- Write yourself a cron script to run something like
example.sh
every 5 minutes or so -- using your webhook URL so it posts to your gitter. (see above section on running)