Using Python feedparser + sqlite-utils + GitHub Actions to backup Mastodon feeds

Published: 02 May 2023
on channel: Pybites
175
8

In today's video I will show you how to backup your Mostodon toots / posts to a sqlite database using sqlite-utils.

We will explore how to use GitHub Actions' schedule feature as a cronjob and have it commit changes to version control.

We'll also look at a simple Streamlit app to show some trends in the data.

And lastly, I show you some pytest code to prove that the upsert functionality works + a fixture to clean up the test DB.

Hope you pick up some new tricks from this video today. Enjoy!

Links:
Pybites is on Mastodon / Fosstodon (finally!): https://fosstodon.org/@pybites
Repo: https://github.com/bbelderbos/mastodo...
Run GitHub Actions as cronjob example: https://github.com/bbelderbos/mastodo...
Another example where I used this - a self updating GitHub README: https://pybit.es/articles/how-to-crea...
Cronjob syntax helper: https://crontab.guru/
Streamlit: https://streamlit.io/
Sqlite-utils: https://sqlite-utils.datasette.io/en/...
Pybites fixtures article: https://pybit.es/articles/pytest-fixt...

---
Learn more about Pybites / what we do: https://pybit.es

Get our weekly developer / mindset emails: https://pybit.es/friends/

Join our Slack community: https://pybit.es/community/

And last but not least, we appreciate any feedback to make our YouTube content better 💡
https://form.jotform.com/230941798741062 🙏


On this page of the site you can watch the video online Using Python feedparser + sqlite-utils + GitHub Actions to backup Mastodon feeds with a duration of hours minute second in good quality, which was uploaded by the user Pybites 02 May 2023, share the link with friends and acquaintances, this video has already been watched 175 times on youtube and it was liked by 8 viewers. Enjoy your viewing!