Skip to content

Instantly share code, notes, and snippets.

@edsu
Last active December 15, 2015 16:59
Show Gist options
  • Save edsu/5293224 to your computer and use it in GitHub Desktop.
Save edsu/5293224 to your computer and use it in GitHub Desktop.
count bot edits in wikidata using stathat
#!/usr/bin/env coffee
stathat = require('stathat')
wikichanges = require('wikichanges')
log = (change) ->
stathat.trackEZCount "ed@example.name", change.user, 1, (status, json) ->
console.log change.user, status
w = new wikichanges.WikiChanges(wikipedias: ["#wikidata.wikipedia"])
w.listen (change) ->
if change.robot
log change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment