changed textorder and commented out codeblocks
This commit is contained in:
parent
36da56f04a
commit
79162961e9
50
readme.md
50
readme.md
@ -6,23 +6,21 @@ DE: Importiert Veranstaltungen aus dem OpenStreetMap Calendar nach Mobilizon, fi
|
|||||||
|
|
||||||
## Features / Funktionen
|
## Features / Funktionen
|
||||||
|
|
||||||
|
EN:
|
||||||
- Fetches German OSMCal events via API
|
- Fetches German OSMCal events via API
|
||||||
Lädt deutsche OSMCal-Veranstaltungen über die API
|
|
||||||
|
|
||||||
- Filters events by radius around Heidelberg
|
- Filters events by radius around Heidelberg
|
||||||
Filtert Veranstaltungen nach Radius um Heidelberg
|
|
||||||
|
|
||||||
- Reads the original description from each event’s `.ics` file
|
- Reads the original description from each event’s `.ics` file
|
||||||
Liest die Originalbeschreibung aus der jeweiligen `.ics`-Datei
|
|
||||||
|
|
||||||
- Imports into Mobilizon via GraphQL
|
- Imports into Mobilizon via GraphQL
|
||||||
Importiert nach Mobilizon per GraphQL
|
|
||||||
|
|
||||||
- Supports Mobilizon group posting
|
- Supports Mobilizon group posting
|
||||||
Unterstützt Veröffentlichung als Mobilizon-Gruppe
|
|
||||||
|
|
||||||
- Avoids duplicate imports using a local state file
|
- Avoids duplicate imports using a local state file
|
||||||
Verhindert doppelte Importe über eine lokale Statusdatei
|
|
||||||
|
DE:
|
||||||
|
- Lädt deutsche OSMCal-Veranstaltungen über die API
|
||||||
|
- Filtert Veranstaltungen nach Radius um Heidelberg
|
||||||
|
- Liest die Originalbeschreibung aus der jeweiligen `.ics`-Datei
|
||||||
|
- Importiert nach Mobilizon per GraphQL
|
||||||
|
- Unterstützt Veröffentlichung als Mobilizon-Gruppe
|
||||||
|
- Verhindert doppelte Importe über eine lokale Statusdatei
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -39,25 +37,27 @@ Install dependencies:
|
|||||||
python3 -m venv .venv
|
python3 -m venv .venv
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
pip install requests python-dotenv icalendar
|
pip install requests python-dotenv icalendar
|
||||||
|
```
|
||||||
#auf dem eigenen Rechner voraussetzungen schaffen
|
#auf dem eigenen Rechner voraussetzungen schaffen
|
||||||
#Verzeichnis erstellen und darin ausführen:
|
#Verzeichnis erstellen und darin ausführen:
|
||||||
```bash
|
```bash
|
||||||
python3 -m venv .venv
|
python3 -m venv .venv
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration / Konfiguration
|
## Configuration / Konfiguration
|
||||||
|
|
||||||
Create a .env file:
|
Create a .env file:
|
||||||
|
```
|
||||||
MOBILIZON_INSTANCE="https://rheinneckar.events"
|
MOBILIZON_INSTANCE="https://rheinneckar.events"
|
||||||
MOBILIZON_TOKEN="API token"
|
MOBILIZON_TOKEN="API token"
|
||||||
MOBILIZON_ORGANIZER_ACTOR_ID="profile actor ID"
|
MOBILIZON_ORGANIZER_ACTOR_ID="profile actor ID"
|
||||||
MOBILIZON_ATTRIBUTED_TO_ID="group actor ID"
|
MOBILIZON_ATTRIBUTED_TO_ID="group actor ID"
|
||||||
|
```
|
||||||
|
|
||||||
#The helper script setup-mobilizon.py can create this .env file.
|
#The helper script setup-mobilizon.py can create this .env file.
|
||||||
|
#Mit dem hilfsscript setup-mobilizon.py lässt sich die .env Datei automatisch befüllen.
|
||||||
|
|
||||||
## Usage / Nutzung
|
## Usage / Nutzung
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ Run the importer:
|
|||||||
```bash
|
```bash
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
./import-osmcal-to-mobilizon.py
|
./import-osmcal-to-mobilizon.py
|
||||||
|
```
|
||||||
Example output:
|
Example output:
|
||||||
70 Veranstaltungen aus OSMCal geladen
|
70 Veranstaltungen aus OSMCal geladen
|
||||||
9 Veranstaltungen im 15-km-Umkreis um Heidelberg
|
9 Veranstaltungen im 15-km-Umkreis um Heidelberg
|
||||||
@ -73,7 +73,7 @@ Example output:
|
|||||||
|
|
||||||
## Settings / Einstellungen
|
## Settings / Einstellungen
|
||||||
Edit these values in import-osmcal-to-mobilizon.py.
|
Edit these values in import-osmcal-to-mobilizon.py.
|
||||||
Diese Werte in dieser Datei anpassen
|
Diese Werte in der Datei import-osmcal-to-mobilizon.py anpassen
|
||||||
|
|
||||||
Radius / Radius um die angegebenen Koordinaten
|
Radius / Radius um die angegebenen Koordinaten
|
||||||
RADIUS_KM = 18.0
|
RADIUS_KM = 18.0
|
||||||
@ -90,28 +90,30 @@ EVENT_DURATION_HOURS = 3
|
|||||||
## Duplicate handling / Umgang mit bereits importierten Veranstaltungen
|
## Duplicate handling / Umgang mit bereits importierten Veranstaltungen
|
||||||
|
|
||||||
Imported events are stored in:
|
Imported events are stored in:
|
||||||
|
Importierte Veranstaltungen werden in folgender Datei gespeichert:
|
||||||
imported-osmcal-events.json
|
imported-osmcal-events.json
|
||||||
|
|
||||||
Veranstaltungen in dieser Datei werden bei einem erneuten Lauf des Skriptes übersprungen.
|
|
||||||
Events listed there are skipped on future runs.
|
Events listed there are skipped on future runs.
|
||||||
|
Veranstaltungen in dieser Datei werden bei einem erneuten Lauf des Skriptes übersprungen.
|
||||||
|
|
||||||
Reset for a new test / Zurücksetzen vor einen neuen Lauf:
|
Reset for a new test / Zurücksetzen vor einen neuen Lauf:
|
||||||
```bash
|
```bash
|
||||||
echo '{}' > imported-osmcal-events.json
|
echo '{}' > imported-osmcal-events.json
|
||||||
|
```
|
||||||
|
|
||||||
Vorher alte Entwürfe oder Events in Mobilizon löschen, sonst entstehen Duplikate.
|
|
||||||
Delete old Mobilizon drafts or events first, otherwise duplicates may be created.
|
Delete old Mobilizon drafts or events first, otherwise duplicates may be created.
|
||||||
|
Vorher alte Entwürfe oder Events in Mobilizon löschen, sonst entstehen Duplikate.
|
||||||
|
|
||||||
Notes / Hinweise
|
Notes / Hinweise
|
||||||
|
|
||||||
DE:
|
|
||||||
Bestehende Mobilizon-Events werden nicht aktualisiert.
|
|
||||||
Bestehende Entwürfe werden nicht automatisch veröffentlicht.
|
|
||||||
Wenn DRAFT von True auf False geändert wird, werden bereits importierte Events trotzdem übersprungen.
|
|
||||||
Der Access-Token kann ablaufen und muss dann erneuert werden.
|
|
||||||
|
|
||||||
EN:
|
EN:
|
||||||
Existing Mobilizon events are not updated.
|
Existing Mobilizon events are not updated.
|
||||||
Existing drafts are not automatically published.
|
Existing drafts are not automatically published.
|
||||||
If DRAFT is changed from True to False, already imported events are still skipped.
|
If DRAFT is changed from True to False, already imported events are still skipped.
|
||||||
The access token may expire and then has to be renewed.
|
The access token may expire and then has to be renewed.
|
||||||
|
|
||||||
|
DE:
|
||||||
|
Bestehende Mobilizon-Events werden nicht aktualisiert.
|
||||||
|
Bestehende Entwürfe werden nicht automatisch veröffentlicht.
|
||||||
|
Wenn DRAFT von True auf False geändert wird, werden bereits importierte Events trotzdem übersprungen.
|
||||||
|
Der Access-Token kann ablaufen und muss dann erneuert werden.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user