Python program in a devcontainer that publish a tooth on Mastodon
- Python 3 (allready installed on raspbian lite)
- Pip 3 to install requirements
- Mastodon.py
- A Mastodon account: don't use your personal account
- Create a new account
- In the new account
https://mastodon.social/settings/profileset "Require follow request" to true. - In the new account
https://mastodon.social/settings/profileset "Htis is a bot account" to true. - In the new account
https://mastodon.social/settings/preferences/otherset the posting privacy to "Only Show to followers" - Then follow this new account from your personal account.
- A secure MQTT server on internet (dont use a public one). Some free options io.adafruit.com / cloudamqp.com
$ git clone https://github.com/NakamaLab/mastodon-dev-ontainer.git ./mastodon
$ cd mastodon
$ pip3 install -r requirements.txtCreate a config.json file with the following data
{
"mastodon": {
"access_token": "Application access token",
"api_base_url": "https://mastodon.social')"
}
}