Metadata-Version: 2.4
Name: caldav2ics
Version: 0.1.2
Summary: Cache CalDAV calendars in static .ICS files.
Author-Email: =?utf-8?q?Tim_H=C3=B6rmann?= <pypi@audivir.de>
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Project-URL: Homepage, https://github.com/audivir/caldav2ics
Project-URL: Repository, https://github.com/audivir/caldav2ics
Project-URL: Issues, https://github.com/audivir/caldav2ics/issues
Requires-Python: <3.15,>=3.10
Requires-Dist: caldav
Requires-Dist: doctyper
Requires-Dist: icalendar
Requires-Dist: msgspec[toml]
Requires-Dist: requests
Requires-Dist: typing-extensions
Description-Content-Type: text/markdown

# CalDAV2ICS

A script that downloads all calendars from a CalDAV server and caches them locally as static
`.ics` files.

Passwords are never written to disk: the local cache stores only synced calendar data, and
credentials are stripped before saving.

# Prerequisites

- Python 3.10 to 3.14.

# Installation

```bash
pip install caldav2ics
```

# Usage

Create a config `.toml` file with one section per CalDAV server:

```toml
[server_a]
url = "https://caldav.server_a.com/calendar/remote.php/dav/calendars/user/"
user = "user"
save-dir = "/absolute/path/to/calendars/server_a"

[server_b]
...
```

`save-dir` must be an absolute path. Run the sync:

```bash
caldav2ics config.toml
```

This prompts for the password. To provide it non-interactively, set `C2I_PASSWORD` instead:

```bash
C2I_PASSWORD=$(cat .password) caldav2ics config.toml
```

Each server writes a `cache.pkl` (its synced state, used for incremental updates) and one `.ics`
file per calendar into its `save-dir`:

```
calendars/server_a/
    calendar1.ics
    calendar2.ics
    cache.pkl
```

To integrate with Google Calendar, either upload the `.ics` files or host `save-dir` publicly
(add basic auth or similar for access control; for stronger security, use a different method).

# License

This project is licensed under the `MIT` license. See `LICENSE` for details.
