Add Gitea Actions setup documentation and update .gitignore for CI/CD scripts
This commit is contained in:
83
README.md
Normal file
83
README.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# LawGit
|
||||
|
||||
Automatische Synchronisation deutscher Gesetze von gesetze-im-internet.de als Markdown-Dateien.
|
||||
|
||||
## Übersicht
|
||||
|
||||
Dieses Repository enthält deutsche Gesetze im Markdown-Format, die automatisch von [gesetze-im-internet.de](https://www.gesetze-im-internet.de) synchronisiert werden.
|
||||
|
||||
## Struktur
|
||||
|
||||
```
|
||||
lawgit/
|
||||
├── laws_md/ # Gesetze als Markdown (eine Datei pro Paragraph)
|
||||
│ ├── bgb/ # Beispiel: BGB
|
||||
│ │ ├── README.md # Übersicht aller Paragraphen
|
||||
│ │ ├── §1.md # Einzelne Paragraphen
|
||||
│ │ ├── §2.md
|
||||
│ │ └── ...
|
||||
│ └── ...
|
||||
├── update_laws.py # Skript zum Aktualisieren der Gesetze
|
||||
├── xml_to_markdown.py # Skript zur Konvertierung von XML zu Markdown
|
||||
└── .gitea/workflows/ # Gitea Actions Workflows
|
||||
```
|
||||
|
||||
## Automatische Updates
|
||||
|
||||
Das Repository wird täglich automatisch aktualisiert durch:
|
||||
- **Gitea Actions**: Läuft täglich um 02:00 UTC
|
||||
- **RSS-Feed**: Überwacht Änderungen auf gesetze-im-internet.de
|
||||
- **Automatischer Commit**: Änderungen werden automatisch committed und gepusht
|
||||
|
||||
## Manuelle Nutzung
|
||||
|
||||
### Gesetze aktualisieren
|
||||
|
||||
```bash
|
||||
# Dependencies installieren
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Gesetze aktualisieren (lädt XML-Dateien)
|
||||
python3 update_laws.py
|
||||
|
||||
# Zu Markdown konvertieren
|
||||
python3 xml_to_markdown.py --prod
|
||||
```
|
||||
|
||||
### Test-Modus
|
||||
|
||||
```bash
|
||||
# Test mit wenigen Gesetzen
|
||||
python3 test_init_laws.py
|
||||
python3 xml_to_markdown.py # Verwendet test_laws automatisch
|
||||
```
|
||||
|
||||
## Gitea Actions Setup
|
||||
|
||||
Siehe [GITEA_ACTIONS_SETUP.md](GITEA_ACTIONS_SETUP.md) für die vollständige Anleitung zur Einrichtung des Gitea Actions Runners.
|
||||
|
||||
Kurzfassung:
|
||||
1. Act Runner auf dem Server installieren
|
||||
2. Runner in Gitea registrieren
|
||||
3. Workflow wird automatisch ausgeführt
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `feedparser` - RSS-Feed Parsing
|
||||
- `requests` - HTTP-Requests
|
||||
- `beautifulsoup4` - HTML/XML Parsing
|
||||
|
||||
Installation:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## Lizenz
|
||||
|
||||
Die Gesetze selbst sind öffentliche Informationen. Die Skripte stehen unter einer freien Lizenz.
|
||||
|
||||
## Kontakt
|
||||
|
||||
Bei Fragen oder Problemen öffne ein Issue im Repository.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user