https://github.com/edsu/congresseditors
the code that runs the @congresseditors twitter bot
https://github.com/edsu/congresseditors
Last synced: over 1 year ago
JSON representation
the code that runs the @congresseditors twitter bot
- Host: GitHub
- URL: https://github.com/edsu/congresseditors
- Owner: edsu
- License: cc0-1.0
- Created: 2014-08-29T11:05:15.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2018-09-15T19:27:42.000Z (over 7 years ago)
- Last Synced: 2024-10-12T05:55:22.677Z (over 1 year ago)
- Language: CoffeeScript
- Homepage: http://twitter.com/congresseditors
- Size: 14.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# congresseditors
congresseditors is a bot that watches for edits to Wikipedia articles related
to the US Congress and tweets them at
[@congresseditors](http://twitter.com/congresseditors).
The @congresseditors Twitter account was originally run by an instance of
[anon](http://github.com/edsu/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:
* [List of current members of the United States House of Representatives](https://en.wikipedia.org/wiki/List_of_current_members_of_the_United_States_House_of_Representatives_by_age_and_generation)
* [List of current United States Senators](https://en.wikipedia.org/wiki/List_of_current_United_States_Senators)
* [List of bills in the 113th United States Congress](https://en.wikipedia.org/wiki/List_of_bills_in_the_114th_United_States_Congress) - you can configure the source for the bills for the current congress in your `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.
## Run
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
## Develop
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
## Kubernetes
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](https://wikitech.wikimedia.org/wiki/Main_Page).
The `bin` and `etc` directories contain config files and a script to start and
stop the Kubernetes jobs.
## License:
* [CC0](LICENSE) public domain dedication