When I came to #Mastodon I directly engaged with the bot possibilities, and so I started my own RSS feed bridge to publish in the #fediverse. This is around a year and a half ago.
Since then, my EchoBot evolved quite a lot in stability and functionalities, but moved a bit away from the initial idea of having a personal companion that pings me when new content has published.
Recently I took its last version, stripped out everything not meant to be in a RSS feed reader, and added mentions interaction, to give birth to a new bot: the Masto-Feed.
Today I just finished the last details after seeing it working nice for the last month, and I am proud to present it to you in this blog post.
While working in my pyxavi #Python library I was wondering how complicated would it be to publish it as the rest of the packages I use often. How difficult is to build and distribute a project through #PyPI? In this article I go through the steps of building and publishing a Python package into PyPI with #Poetry for everyone to use it.
Portava temps que em rondava pel cap la idea d'un bot que comprovés algunes mètriques del sistema i si algun valor es dispara llavors em publiqui una alerta a Mastodon. El que va començar com a un projecte senzill ha acabat una mica més treballat, capaç de comunicar entre bots i fer de centraleta d'alarmes i missatges de log.
En aquest article explico què fa i com posar-lo en marxa 🚀
Seguint amb el primer article sobre les èines del programador Python, aquí parlo de cobrir el codi amb un estil definit mitjançant un autoformatter i un linter, assegurar la funcionalitat amb tests, i que aquestes comprobacions es passin automàticament en cada push a un Pull Request de GitHub. De fet, aquest és el setup que tenim al meu equip i ens garanteix uns mínims de coherència i qualitat al nostre codi.
L'altre dia li donava una volta al mòdul de Python que mantinc, amb les llibreries bàsiques que uso en els meus projectes personals. Tenia ganes d'aplicar les comprovacions que en el meu equip apliquem al nostre codi, com a pràctica i com a repàs personal, i ja de pas documentar-ho en una sèrie d'articles.
En aquest primer parlo de l'estructura bàsica d'un mòdul en Python i de les èines que hi utilitzo, Poetry i el Makefile, com a preparació de la segona part en la que parlaré d'autoformat, linter, tests i un xic d'automatització.
At this point should not be anything new that I'm playing with my own Mastodon instance. It is meant to be focused on a village in the core of Catalunya, so the scope is so small that I'm alone there 🤪
This also brings me the opportunity to work towards some goals kinda freely: get as much related content as possible, as much automated as possible. So next direct step is: from whom can I get more content? And then, how? Once you answer the first, the second usually comes as a bot getting content from RSS feeds or other Mastodon or Twitter accounts. And because life is not fun otherwise, let's reinvent the wheel and do everything from scratch: a bot to get and publish content to Mastodon.