diff --git a/AGENTS.md b/AGENTS.md index 7a311c6..b09b636 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -144,3 +144,9 @@ See `.env.example` for full list. Key variables: 2. Edit `src/sync.py` for orchestration changes 3. Update `SPEC.md` if sync behavior changes 4. Test with a single account first: set `LOG_LEVEL=DEBUG` + +## License + +MIT License - Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +- Full text in `LICENSE` +- License headers in all source code files diff --git a/Dockerfile b/Dockerfile index b2d930d..c5e5b53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ WORKDIR /app COPY requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r /app/requirements.txt +COPY LICENSE . COPY src/ /app/ COPY sql/ /app/sql/ COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3556447 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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 OR COPYRIGHT HOLDERS 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. diff --git a/README.md b/README.md index a2a488b..9fd62fe 100644 --- a/README.md +++ b/README.md @@ -221,3 +221,7 @@ eigenen Accounts. ``` curl -H "Remote-User: mmustermann" http://127.0.0.1:8000/api/contacts ``` + +## License + +Licensed under the [MIT License](LICENSE) - Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index d42e403..d472403 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. set -e # Wurde ein alternativer Befehl uebergeben (z.B. uvicorn), fuehre diesen diff --git a/src/api/__init__.py b/src/api/__init__.py index e69de29..91f759e 100644 --- a/src/api/__init__.py +++ b/src/api/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. diff --git a/src/api/auth.py b/src/api/auth.py index 0b47d1e..f504336 100644 --- a/src/api/auth.py +++ b/src/api/auth.py @@ -1,3 +1,5 @@ +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. """Authelia-Integration: liest den vom Reverse-Proxy weitergereichten Remote-User-Header und mappt ihn per accounts.json auf einen internen Account-Namen. Kein eigenes Login, Authelia übernimmt die eigentliche diff --git a/src/api/main.py b/src/api/main.py index 55964d0..000d14f 100644 --- a/src/api/main.py +++ b/src/api/main.py @@ -1,3 +1,5 @@ +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. """FastAPI-App für die interne Web-Ansicht/API der iCloud-Kontakte. Läuft im selben Image wie der Sync-Container, wird aber über einen diff --git a/src/api/schemas.py b/src/api/schemas.py index cc27f02..c8e3f1e 100644 --- a/src/api/schemas.py +++ b/src/api/schemas.py @@ -1,3 +1,5 @@ +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. from datetime import date from pydantic import BaseModel diff --git a/src/api/templates/contact.html b/src/api/templates/contact.html index 47d3d0f..724778a 100644 --- a/src/api/templates/contact.html +++ b/src/api/templates/contact.html @@ -1,3 +1,5 @@ + + diff --git a/src/api/templates/index.html b/src/api/templates/index.html index f678e65..11ea19a 100644 --- a/src/api/templates/index.html +++ b/src/api/templates/index.html @@ -1,3 +1,5 @@ + + diff --git a/src/carddav_client.py b/src/carddav_client.py index 92d5c86..81fcc0d 100644 --- a/src/carddav_client.py +++ b/src/carddav_client.py @@ -1,3 +1,5 @@ +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. """ CardDAV-Client für iCloud (RFC 6352) mit Delta-Sync über sync-collection (RFC 6578). diff --git a/src/config.py b/src/config.py index 246eecd..4bef023 100644 --- a/src/config.py +++ b/src/config.py @@ -1,3 +1,5 @@ +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. import os import json from dotenv import load_dotenv diff --git a/src/db.py b/src/db.py index 9871cab..ee9465e 100644 --- a/src/db.py +++ b/src/db.py @@ -1,3 +1,5 @@ +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. """MariaDB-Anbindung: Delta-Sync-Strategie (Upsert für Änderungen, gezieltes Löschen für Removals).""" import logging import os diff --git a/src/mailer.py b/src/mailer.py index 7604072..ff2e182 100644 --- a/src/mailer.py +++ b/src/mailer.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. """Sendet eine tägliche E-Mail mit allen heutigen Geburtstagskindern aus der contacts-Tabelle (über alle Accounts hinweg). Wird per Cron einmal täglich um MAIL_SEND_HOUR aufgerufen. Verhindert Doppelversand am selben Tag über diff --git a/src/scheduler.py b/src/scheduler.py index a1653b2..09c25b1 100644 --- a/src/scheduler.py +++ b/src/scheduler.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. """Einfacher Cron-Scheduler fuer Sync und Mailer. Ersetzt supercronic komplett — keine externe Abhaengigkeit noetig. diff --git a/src/sync.py b/src/sync.py index 54c8a0d..675f6d4 100644 --- a/src/sync.py +++ b/src/sync.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. """Einstiegspunkt für einen Sync-Lauf über alle konfigurierten Accounts. Für jeden Account wird ein Delta-Sync per CardDAV sync-collection (RFC 6578) durchgeführt. Beim allerersten Lauf eines Accounts (kein gespeicherter diff --git a/src/vcard_parser.py b/src/vcard_parser.py index 61338ee..ca823f4 100644 --- a/src/vcard_parser.py +++ b/src/vcard_parser.py @@ -1,3 +1,5 @@ +# Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) +# Licensed under the MIT License. See LICENSE file in project root for details. """Parst rohen vCard-Text in ein flaches dict, passend zum contacts-Schema.""" import json import logging