Skip to content

bennuttall/rpi-otd-bot

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 

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.txt

Usage

  • 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.sqlite to create the database schema
  • Run python update_db.py to populate the database
  • Add it to cron daily so it keeps the database up-to-date
  • Run python bot.py to 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

About

A Twitter bot which tweets "on this day" blog posts from Raspberry Pi's blog archive

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages