diff --git a/README.md b/README.md index ab68b8c..a31b35b 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,26 @@ -### description +# mastodon-bot -the bot will post the timeline from the specified Twitter/Tumblr accounts and RSS feeds to Mastodon +Diese Bot-Software von Dmitri Sotnikov erlaubt das Cross-Posten von Beiträgen aus einem Twitter Feed oder einem RSS Feed auf Mastodon. -### installation +Original: https://github.com/yogthos/mastodon-bot -1. install [Node.js](https://nodejs.org/en/) -2. run `npm install` to install Node modules -3. run `npm start` to, well, start +In diesem Repository bieten wir eine angepasste Version mit vereinfachter Dokumentation und Konfiguration. -If you wish to run the script directly, you will need to have [Lumo](https://github.com/anmonteiro/lumo) available on the shell path. Lumo can be installed globally via NPM by running: +#### Ausführung - npm install -g lumo-cljs - -If you get a [permission failure](https://github.com/anmonteiro/lumo/issues/206), try this: - - npm install -g lumo-cljs --unsafe-perm - -### usage - -#### Docker synopsis +Mit Docker und der Konfigurationsdatei `my_config.edn` im aktuellen Verzeichnis kann der Bot so ausgeführt werden: docker run --rm -ti \ -v $(pwd):/config \ --env MASTODON_BOT_CONFIG=/config/my_config.edn \ quay.io/netzbegruenung/mastodon-bot -#### long form +#### Vorbereitung und Konfiguration -* create a Mastodon API key following the instructions [here](https://tinysubversions.com/notes/mastodon-bot/) -* create a Twitter API key follwing the instructions [here](https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens) -* create a Tumblr API key following the instructions [here](http://www.developerdrive.com/2014/05/how-to-get-started-with-the-tumblr-api-part-1/) -* create a config file by copying the `config.edn.example` +- Erstelle einen Mastodon API key wie [hier](https://tinysubversions.com/notes/mastodon-bot/) beschrieben. Geht dazu auf https://gruene.social/settings/applications und ersttellt einen Key mit der Berechtigung `read:statuses` und `write:statuses`. +* Erzeuge einen Twitter Developer account und eine App wie [hier](https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens) beschrieben. +* Kopiere `config.edn.example` und trage alle API keys und weitere Daten ein, wie darin beschrieben. -**NOTE**: the bot checks the specified Mastodon account to see the timestamp of the last post, and only posts content -with later timestamps to avoid duplicate posts. On the first run the timestamp will default to current time. - -* the bot looks for `config.edn` at its relative path by default, an alternative location can be specified either using the `MASTODON_BOT_CONFIG` environment variable or passing the path to config as an argument - -* run the bot: `./mastodon-bot.cljs` -* to poll at intervals setup a cron job such as: - - */30 * * * * mastodon-bot.cljs /path/to/config.edn > /dev/null 2>&1 ## License