Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmdr-nova/tumblr-py
A script that pulls the top trending posts from Tumblr, sorts out an image post, and then posts it to Mastodon.
https://github.com/cmdr-nova/tumblr-py
automation images mastodon python script tumblr
Last synced: 7 days ago
JSON representation
A script that pulls the top trending posts from Tumblr, sorts out an image post, and then posts it to Mastodon.
- Host: GitHub
- URL: https://github.com/cmdr-nova/tumblr-py
- Owner: cmdr-nova
- Created: 2024-10-18T23:38:17.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-18T23:49:47.000Z (2 months ago)
- Last Synced: 2024-12-16T09:54:25.562Z (8 days ago)
- Topics: automation, images, mastodon, python, script, tumblr
- Language: Python
- Homepage: https://mkultra.monster/@net_run
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tumblr-py
I wanted to find a way to make Tumblr seem a bit more connected to the Fediverse. Since Matt Mullenweg is too busy self-destructing and bringing Wordpress down with him (as of writing this, October 18th, 2024), Tumblr's apparently *eventual* ActivityPub integration seems to never be coming. Fear not! Python's got your back, homie. So, I made this little script that looks at the top trending posts across Tumblr, then picks an image post, and finally, drops that mother-freaker right onto Mastodon.
Simple.
Steps:
Setup an environment
```
python3 -m venv your-environment
```Activate the environment, and then install the Mastodon code.
```
pip install mastodon.py
```Put the script into the same directory, and then set us up a cronjob to pull just once, per day.
```
0 17 * * * tumblr-bot/tumblr-env/bin/python3 tumblr-py/tumblr-py.py
```
(this is an example that posts at 5pm each day)The reason you only want to do this *once* per day, is because, in order to pull a larger base of image posts, you need to make *numerous* API calls, which will rate limit you in seconds. So, instead, just have it make an API call once a day, and post the result. If the result turns out to be the same every single day, then maybe that's something for me to investigate further.
But, there you go!