yellow-mastodonapi/readme.md
2026-01-01 15:34:11 +01:00

48 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p align="right"><a href="https://codeberg.org/simonpipe/yellow-mastodonapi/src/branch/main/readme.md">Deutsch</a> &nbsp; <a href="https://codeberg.org/simonpipe/yellow-mastodonapi/src/branch/main/readme-en.md">English</a></p>
# MastodonAPI
Ein Plug-in, um deine öffentlichen Toots via Mastodon-API in deinen Yellow Blog zu importieren. Das Plugin funktiert mit Mastodon und mit GoToSocial.
## Installation
1. ZIP-Datei herunterladen
2. In das Verzeichnis `/system/extensions` kopieren
3. Deine Website neu laden das Plug-in ist nun installiert
## Benutzung
Das Plug-in wird über einen individuellen **Webhook** aufgerufen.
Beim Aufruf fragt es deine Mastodon-API ab und erstellt aus deinen Toots automatisch Blogbeiträge.
Optional kannst du einen **#Hashtag** angeben, um nur bestimmte Beiträge zu importieren.
## Einstellungen
Alle Einstellungen findest du in `system/extensions/yellow-system.ini`:
- **MastodonapiInstanceUrl** URL deiner Mastodon-Instanz (z. B. `https://mastodon.social`)
- **MastodonapiAccountId** deine Mastodon-User-ID (numerisch, z. B. `1234567890`)
- ID bei einem Mastodon-Account finden: Gib im Browser "https://DEINE_INSTANZ_URL/api/v1/accounts/lookup?acct=PROFILNAME" ein.
- ID bei einem GoToSocial-Account finden <a href="https://codeberg.org/simonpipe/yellow-mastodonapi/src/branch/main/help-gotoso-de.md">(siehe hier)</a>
- **MastodonapiAccessToken**
- Bei einem Mastodon-Account optional
- Bei einem GoToSocial-Account pflicht <a href="https://codeberg.org/simonpipe/yellow-mastodonapi/src/branch/main/help-gotoso-de.md">(siehe hier)</a>
- **MastodonapiLimit** - Standartwert ist 20
- **MastodonapiHashtag** leer lassen = alle öffentlichen Beiträge importieren; mit `#hashtag` = nur Beiträge mit diesem Tag
- **MastodonapiAuthor** Name, unter dem die Blogposts erscheinen sollen
- **MastodonapiTag** Tag, mit dem die Blogposts im Blog versehen werden
- **MastodonapiFolder** Pfad zum Blog-Ordner (z. B. `content/1-blog/`)
- **MastodonapiTriggerPath** Webhook-Pfad, z. B. `/mastodonapi-webhook-CHANGE_THIS_SECRET_KEY`
- Unbedingt anpassen! Wer diesen Link kennt, kann das Plug-in starten.
- **MastodonapiStatus** public
- public = page is a normal page
- draft = page is not visible, user needs to log in, requires <a target="blank_" href="https://github.com/annaesvensson/yellow-draft">draft extension</a>
- unlisted = page is not visible, but can be accessed with the correct link
- **MastodonapiMaxAge** 1
- In Stunden. 0 = alle Toots.
💡 Du kannst den Webhook auch per Cronjob regelmäßig aufrufen (z. B. stündlich).
## Entwickler
Simon Pipe