update
updaet
updaet
A bot to automatically post pictures to Reddit and Mastodon. Ostensibly posts snow leopard 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:
reddit.agent
:
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>"
masto.agent
:
App ID: <client key>
App Secret: <client secret>
User Token: <access token>
Put those in /var/local/sneps/
. Also name your image files in the format
of 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/sneps/
. If you want to
start at a day other than 1, make a /var/local/sneps/day.txt
only
containing the day you want to start at.
Then just set it to fire on a cron job, it's a one-shot affair.
Dependencies:
$ go build
# go install
send patches and reports to ~nytpu/public-inbox@lists.sr.ht