Skip to content

Mastodon bot posting automatic updates on the Danish emission intensities.

Notifications You must be signed in to change notification settings

groenstroem/mastodon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grøn strøm Mastodon bot

This repository contains the code for the Mastodon bot posting automatic updates on the Danish emission intensities, currently live as @[email protected].

Configuration

To use this, create a user on a Mastodon instance (e.g. mastodon.social), and create an app with that user with rights to create Mastodon statuses. Note the access token from the Mastodon app.

Running

With these at hand, fill out config.json.example and move the result to config.json.

Then to create a Mastodon update with the current emission intensities, get all dependencies and run the only available script,

pip install requests
python toot.py

Docker

Alternatively, use Docker, specifying all configuration parameters as environment variables,

docker build -t groenstroem-mastodon
docker run -e MASTODON_INSTANCE=mastodon.social -e ACCESS_TOKEN=... groenstroem-mastodon