yellow-mastodonapi/readme-en.md
2025-08-12 15:57:52 +02:00

42 lines
2.1 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
A plugin to import your public Toots via Mastodon API into your Yellow Blog.
## Installation
1. Download the ZIP file
2. Copy it into the `/system/extensions` directory
3. Reload your website the plugin is now installed
## Usage
The plugin is triggered via a custom **webhook**.
When the webhook is called, it fetches your Toots from the Mastodon API and creates blog posts from them.
Optionally, you can specify a **#hashtag** to import only matching posts.
## Settings
All settings are in `system/extensions/yellow-system.ini`:
- **MastodonapiInstanceUrl** your Mastodon instance URL (e.g. `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** leave empty to import all public posts; set to `#hashtag` to import only matching posts
- **MastodonapiAuthor** author name to use for imported blog posts
- **MastodonapiTag** tag to assign to imported blog posts
- **MastodonapiFolder** path to your blog folder (e.g. `content/1-blog/`)
- **MastodonapiTriggerPath** webhook path, e.g. `/mastodonapi-webhook-CHANGE_THIS_SECRET_KEY`
*(Be sure to change it! Anyone with this link can trigger the plugin.)*
💡 You can also call the webhook via a cron job to run the plugin automatically (e.g., every hour).
## Developer
Simon Pipe