From: Maurizio Paglia Date: Wed, 30 Nov 2022 09:30:54 +0000 (+0100) Subject: Update README.md X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=e8dad3c0059129418132449e7c81518b5d797e7c;p=blog.git Update README.md --- diff --git a/README.md b/README.md index ca2dcf74..460f6f0e 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,6 @@ # Pelican-toot A Pelican plugin to publish content on Mastodon -## THIS IS A VERY EARLY STAGE OF DEVELOPMENT -## DO NOT USE!! - -==================================================================================== -TEST - TEST - TEST -==================================================================================== - Hacked from [Pelican-tweet](https://github.com/mpaglia0/Pelican-tweet). Needs Python > 3.0 @@ -22,14 +15,27 @@ Then it tries to post all eligible articles to Mastodon and - if post routine re On every further run it matches the actual articles list with the list in `posted_on_Mastodon.txt` file and posts only new articles (and writes them in `posted_on_Mastodon.txt`). +*Pelican-toot* is at its very first stage of development, but it is already usable in product environments. + +This release can publish: + +- Title of article +- Body of article +- hashtag(s) if any + ## Mastodon APIs +This plugin depends on [Mastodon.py](https://github.com/halcy/Mastodon.py). + In order to publish on Mastodon you need to enter in `publishconf.py` the following information: -TODO ``` python -MASTODON_CONSUMER_KEY = '' -... +MASTODON_BASE_URL = 'URL of your Mastodon instance. For example https://mastodon.social' +MASTODON_USERNAME = 'Your username for Mastodon login' +MASTODON_PASSWORD = 'You password for Mastodon login' ``` +There is no need to register an app in your Mastodon profile because *Pelican-toot* will do it for you! -This plugin depends on [Mastodon.py](https://github.com/halcy/Mastodon.py). +On every run *Pelican-toot* looks for a file called `pelicantoot_clientcred.secret` and - if it is not found - it gets in touch with Mastodon, creates an app called *PelicanToot* and writes API keys and other necessary information in this file. + +If you cancel this file *Pelican-toot* will create another app (this could be done in case of problem despite the fact Mastodon advise this is NOT a good behaviour since app should be created only once).