the code that runs the @congresseditors twitter bot
CC0-1.0 License
congresseditors is a bot that watches for edits to Wikipedia articles related to the US Congress and tweets them at @congresseditors. The @congresseditors Twitter account was originally run by an instance of anon, but it started getting enough custom functionality that it made sense to split it off into its own program.
Every hour congresseditors builds a watchlist of relevant articles by examining these Wikipedia articles:
config.json
Of course it''s unlikely that the current members change that often, but bills are more volatile. congressedits ignores changes if less than 10 characters in the article were changed (typos, etc). It also ignores repeated edits from of the same article by the same user.
sudo apt-get install node
git clone https://github.com/edsu/congresseditors
cd congresseditors
npm install
cp config.json.template config.json
Edit config.json to add your twitter credentials, and then:
node congresseditors.js
You will need to install coffeescript to be able to work on the code.
sudo apt-get install coffeescript
As you are working on your changes you can run with:
coffee congressedits.coffee
Just make sure when you are done to compile it to JavaScript.
coffee -c congresseditors.coffee
The congresseditors bot runs in the Wikimedia Wikitech environment in their Kubernetes cluster. Instructions on how to get access can be found on their wiki.
The bin
and etc
directories contain config files and a script to start and
stop the Kubernetes jobs.