A bot to automatically post pictures to Reddit and Mastodon. Ostensibly posts cheetah pictures, but it'll work on anything.
Entirely conceived, researched, and written in around an hour, so the code is not necessarily what could be called “high quality.”
you need to create "agent files" containing your reddit and mastodon credentials:
user_agent: "<platform>:<app ID>:<version string> (by /u/<reddit username>)" client_id: "<client id>" client_secret: "<client secret>" username: "<reddit username>" password: "<reddit password>"
App ID: <client key> App Secret: <client secret> User Token: <access token>
Put those in
/var/local/cheetahs/. Also name your image files in the format
DXXX.jpg (you need 3 digits) and add a description of them in the format
DXXX.desc, and put all of them in
/var/local/cheetahs/. If you want to
start at a day other than 1, make a
containing the day you want to start at.
Then just set it to fire on a cron job, it's a one-shot affair.
- go (>=1.13)
$ go build # go install
send patches and reports to ~email@example.com