Raspberry Pi OTD Twitter Bot
A Twitter bot which tweets "on this day" blog posts from Raspberry Pi's blog archive: @raspberrypi_otd
Updated October 2021 to cover both raspberrypi.com and raspberrypi.org
Requirements
- Twython
- sqlalchemy
- structlog
pip install -r requirements.txtUsage
- Clone this repo
- Get your Twitter application's API keys from dev.twitter.com
and add them to
auth.py(Do not publish these on your GitHub) - Run
python db/tables.py db.sqliteto create the database schema - Run
python update_db.pyto populate the database - Add it to cron daily so it keeps the database up-to-date
- Run
python bot.pyto test it works - you should see it posts a single tweet - Add it to cron hourly to tweet every matching hour every day
- The year looked up is 2002 + the current hour, so 9am = 2011
