Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

catleeball/tmnt_wikipedia_bot

Repository files navigation

TMNT Wikipedia Bot

Every 60 minutes this Python script posts to https://twitter.com/wiki_tmnt and https://botsin.space/@tmnt

Why

For fun! Inspired by https://xkcd.com/1412/

How

When it runs, it:

  • Pulls 10 random Wikipedia article titles
  • Checks if titles are in trochaic tetrameter
    • If not, pull 10 more articles ad infinitum until a match is found
  • Create a faux-TMNT logo using http://glench.com/tmnt logic
  • Post the title and generated logo to @wiki_tmnt on Twitter

Environment

This script requires the following:

Caveats

I'm not developing this for anyone but myself, so you may see some anti-patterns like hardcoded paths specific to my environment, and general lack of configurability outside editing the source.

Given this runs once per hour, I'm not very concerned about performance. I often choose slow, but readable and easy-to-implement solutions.

TODO

TODO:

  • Complete re-write in rust for learning
  • Use local wikipedia data dump to fetch titles offline
  • More docstrings
  • better README
  • CLI arguments
  • use real file format for keys

Super bonus points:

  • CI

About

Find Wikipedia titles that can be sung to the Teenage Mutant Ninja Turtles themesong.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6

AltStyle によって変換されたページ (->オリジナル) /