This is a Tumblr bot written in Perl! So far it's not complete but I'm working on it
It's based on Pearl from Steven Universe.
The blog is at http://perlbot.tumblr.com/
This branch is stable and has the code I use for posting posts most of the time
All the functions for perlbot.
There is no official Tumblr API for Perl, but there is WWW::Tumblr, which I use.
(the official Tumblr API documentation is also very useful!)
This script calls the functions written in perlbot.pl to queue posts and answer asks.
For obvious reasons, I removed the OAuth parameters from the code (they're stored in environment variables).
This is all the dialogue that Pearl ever says for the Markov Chain to generate sentences from.
So far it has the dialogue from all the episodes from Gem Glow to Lars' Head.
I get it from the Steven Universe wikia and each sentence is on its own line.
All the messages Perlbot got from the blog
The ids of asks that were already answered (since I don't know how to remove them from the inbox) (soon to be unused)
The script that is run hourly.
It:
- Fetches the remote repository & merges
- Runs main.pl
- Makes a commit of blog_dialogue.txt
- Pushes it to Github
- utf8
- Net::OAuth
- HTTP::Request::Common
- LWP::UserAgent
- WWW::Tumblr
- Inline::Python
- Data::Dumper
- HTML::Entities
- String::Markov
- Lingua::EN::Tagger
- XML::LibXML
- File::Random