____ _____ _____ ____ ___ / __)( __)/ ___) / __)/ \ ( (__ ) _) \___ \( (__( O ) \____)(_____)(_____/ \____)\___/
I was bored, so I wrote a Python script to upload my articles to smol.pub, just like the "smolpub.sh" bash script.
It's still a work in progress, but so far, it works for posting new articles and updating existing ones. In fact, I posted this announcement using my script.
The easiest way to install it on your computer is to use the "pipx" package manager by entering this command on your terminal:
pipx install smolpub
The script requires at least Python 3.10 or higher, and just like "smolpub.sh", it requires that you have a copy of your personal token string written in a file called ".smolpub" on a subfolder inside your home directory:
~/.config/
Once the script is installed on your computer, you can invoke it by entering this command in the terminal:
smolpub <file to post>
Where "<file to post>" must be a text file formatted in UTF-8 in GemText format. I recommend you use the ".gmi" extension and follow the formatting instructions that you'll find on this page:
The very first time, the script will ask you to provide a valid API Token for accessing smol.pub. If you don't know how to fetch one yet, please visit:
And copy the API Token and paste it into your terminal, then press ENTER. The script will create a config file for you and will make it accessible only by your actual username.
If you like it, try it and tell me if it works!
Also, look at this page on GitHub, where you will find further documentation about the script and the full source code:
Cheers!
If you want to get in touch with me, you can use one of the following links:
© 2024 Francesco Maida. You are free to distribute the content posted here, as long as you mention me and my website or gemini capsule. Hosted by smol.pub