From 1b7a3e01986fd842e25c671e274616fa6255cf0e Mon Sep 17 00:00:00 2001 From: simonpipe Date: Thu, 28 May 2026 08:14:03 +0200 Subject: [PATCH] Upload files to "/" --- LICENSE | 27 +++++++++++++++++++++++++++ gitattributes | 6 ++++++ readme-de.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ readme.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 LICENSE create mode 100644 gitattributes create mode 100644 readme-de.md create mode 100644 readme.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..54ceed6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,27 @@ +UNLICENSE + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to +and licensed under GPL version 2, unless stated otherwise. \ No newline at end of file diff --git a/gitattributes b/gitattributes new file mode 100644 index 0000000..15ce50b --- /dev/null +++ b/gitattributes @@ -0,0 +1,6 @@ +.gitattributes export-ignore +LICENSE export-ignore +help-gotoso*.md export-ignore +readme*.md export-ignore +# Auto detect text files and perform LF normalization +* text=auto \ No newline at end of file diff --git a/readme-de.md b/readme-de.md new file mode 100644 index 0000000..b559611 --- /dev/null +++ b/readme-de.md @@ -0,0 +1,51 @@ +

Deutsch   English

+ +# Mastodonapi 0.9.8 + +Importiere deine Toots in deinen Blog. Getestet mit Snac. + +## Installation + +Lade die ZIP-Datei herunter und kopiere sie in deinen system/extensions Ordner. Erfahre mehr über Erweiterungen. + +## Funktionsweise + +Das Plugin arbeitet vollautomatisch. Es prüft im Hintergrund regelmäßig, ob neue Beiträge vorhanden sind. + +Wenn du die Seite besuchst, fragt es deine Mastodon-API ab und erstellt automatisch Blog-Beiträge aus deinen Toots. Optional kannst du einen #Hashtag angeben, um nur bestimmte Beiträge zu importieren. + +Es gibt drei Möglichkeiten, den Import auszulösen: + +1. **Automatisch (Lazy Cron):** Sobald ein Besucher deine Website aufruft, prüft das Plugin, ob das Update-Intervall abgelaufen ist und lädt bei Bedarf neue Toots. +2. **Über das Terminal:** Du kannst den Import manuell auf dem Server starten mit: php yellow.php mastodonapi +3. **Über den System-Cronjob:** Falls dein Host Cronjobs unterstützt, kannst du den Befehl php yellow.php mastodonapi regelmäßig ausführen lassen (z. B. alle 30 Minuten). + +## Einstellungen + +Alle Einstellungen befinden sich in `system/extensions/yellow-system.ini`: + +`MastodonapiInstanceUrl` = deine Mastodon Instanz-URL (z. B. https://mastodon.social) +`MastodonapiAccountId` = deine Mastodon User-ID (numerisch, z. B. 1234567890) + +*Finde die ID eines Snac oder Mastodon Accounts: Gib "https://DEINE_INSTANZ_URL/api/v1/accounts/lookup?acct=PROFILNAME" in deinen Browser ein.* +*Finde die ID eines GoToSocial-Accounts (siehe hier)* + +`MastodonapiAccessToken` = optional für einen Mastodon-Account, zwingend für einen GoToSocial-Account (siehe hier) +`MastodonapiUpdateInterval` = Zeitintervall zwischen automatischen Updates in Minuten (Standard: 30) +`MastodonapiLimit` = Anzahl der Toots, die pro Durchgang abgerufen werden (Standard: 20) +`MastodonapiHashtag` = leer lassen für alle Beiträge; oder mit #hashtag filtern +`MastodonapiAuthor` = Name, unter dem die Blog-Beiträge erscheinen sollen +`MastodonapiTag` = Tag für die Blog-Beiträge (Standard: Fediverse) +`MastodonapiFolder` = Pfad zum Blog-Ordner (Standard: content/2-blog/) +`MastodonapiMaxAge` = Alter der Toots in Stunden, die noch importiert werden sollen. 0 = alle verfügbaren Toots +`MastodonapiStatus` = Seitenstatus, Standardwert ist public + +Die folgenden Status-Werte werden unterstützt: + +`public` = Seite ist eine normale Seite +`draft` = Seite ist nicht sichtbar, Benutzer muss eingeloggt sein, erfordert die Draft-Erweiterung +`unlisted` = Seite ist nicht sichtbar, kann aber mit dem richtigen Link aufgerufen werden + +## Entwickler + +Simon Rohr diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..4e94314 --- /dev/null +++ b/readme.md @@ -0,0 +1,51 @@ +

Deutsch   English

+ +# Mastodonapi 0.9.8 + +Import your toots into your blog. Tested with Snac. + +## Installation + +Download ZIP file and copy it into your `system/extensions` folder. Learn more about extensions. + +## How to + +The plugin works fully automatically. It regularly checks in the background if there are new posts. + +When you visit the site, it queries your Mastodon API and automatically creates blog posts from your Toots. Optionally, you can specify a #Hashtag to import only certain posts. + +There are three ways to trigger the import: + +1. **Automatic (Lazy Cron):** As soon as a visitor accesses your website, the plugin checks if the update interval has expired and loads new Toots if necessary. +2. **From the terminal:** You can manually start the import on the server with: `php yellow.php mastodonapi` +3. **From the system cronjob:** If your host supports cronjobs, you can have the command `php yellow.php mastodonapi` run regularly (e.g. every 30 minutes). + +## Settings + +All settings are in `system/extensions/yellow-system.ini`: + +`MastodonapiInstanceUrl` = your Mastodon instance URL (e.g. https://mastodon.social) +`MastodonapiAccountId` = your Mastodon user ID (numeric, e.g. 1234567890) + +*Find the ID of a Snac or Mastodon account: Enter "https://YOUR_INSTANCE_URL/api/v1/accounts/lookup?acct=PROFILNAME" in your browser.* +*Find the ID of a GoToSocial account (see here)* + +`MastodonapiAccessToken` = optional for a Mastodon account, mandatory for a GoToSocial account (see here) +`MastodonapiUpdateInterval` = time interval between automatic updates in minutes (default: 30) +`MastodonapiLimit` = number of Toots retrieved per run (default: 20) +`MastodonapiHashtag` = leave blank for all posts; or filter with #hashtag +`MastodonapiAuthor` = name under which the blog posts should appear +`MastodonapiTag` = tag for the blog posts (default: Fediverse) +`MastodonapiFolder` = path to the blog folder (default: content/2-blog/) +`MastodonapiMaxAge` = age of Toots in hours that should still be imported. 0 = all available Toots +`MastodonapiStatus` = page status, default value is public + +The following status values are supported: + +`public` = page is a normal page +`draft` = page is not visible, user needs to log in, requires draft extension +`unlisted` = page is not visible, but can be accessed with the correct link + +## Developer + +Simon Rohr \ No newline at end of file