Parse one or more ICS calendar files and output in different formats
Project description
Overview
Parse one or more ICS calendar files, merge their events, sort by start time, and print the result in several formats.
Install
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Basic usage
--filepath is required and may be repeated. Paths are read in order; events from every file are combined and sorted by start time.
ics_render --filepath calendar-a.ics --filepath calendar-b.ics
Without an output flag, ics_render prints a text table to stdout.
Output modes
Output format flags are mutually exclusive. Pick one per run.
Default text table
Sorted columns: Start, Duration, Name.
ics_render --filepath tests/fixtures/early.ics --filepath tests/fixtures/late.ics
Start Duration Name
------------------------- ---------- ----------------
2024-06-01T09:00:00+00:00 0:30:00 Morning standup
2024-06-10 1 day All-day planning
2024-06-15T14:00:00+00:00 1:00:00 Release review
JSON Lines (--jsonl)
Each event is one JSON object on its own line. Keys are lower-case, underscore-separated names taken from the original VEVENT properties (summary, start, end, and so on). Timestamp values use ISO 8601.
ics_render --jsonl --filepath tests/fixtures/early.ics --filepath tests/fixtures/late.ics
{"summary": {"parameters": {}, "value": "Morning standup"}, "start": {"parameters": {}, "value": "2024-06-01T09:00:00+00:00"}, "end": {"parameters": {}, "value": "2024-06-01T09:30:00+00:00"}, "uid": {"parameters": {}, "value": "early-1@example"}, "description": {"parameters": {}, "value": "Daily team sync"}}
{"summary": {"parameters": {}, "value": "All-day planning"}, "start": {"parameters": {"value": "DATE"}, "value": "2024-06-10"}, "end": {"parameters": {"value": "DATE"}, "value": "2024-06-11"}, "uid": {"parameters": {}, "value": "late-2@example"}}
{"summary": {"parameters": {}, "value": "Release review"}, "start": {"parameters": {}, "value": "2024-06-15T14:00:00+00:00"}, "end": {"parameters": {}, "value": "2024-06-15T15:00:00+00:00"}, "uid": {"parameters": {}, "value": "late-1@example"}}
Redirect to a file:
ics_render --jsonl --filepath calendar.ics > events.jsonl
HTML month grid (--html)
A self-contained HTML page with a traditional calendar layout: weeks as rows, days as columns (Sunday first), events listed inside each day cell. Timed events show HH:MM before the name.
When events span more than one month, a Month drop-down at the top switches between month grids. The visible grid stays in sync with the selection after refresh.
Click an event to open a detail modal (start, stop, duration, description). Use Copy beside the description to copy it to the clipboard; a Copied toast confirms success.
ics_render --html --filepath tests/fixtures/early.ics --filepath tests/fixtures/late.ics > calendar.html
Open in a browser:
xdg-open calendar.html
HTML table (--html-table)
A self-contained HTML page: one table row per event with Start, Stop, Duration, and Name. Hover the name to see the description as a tooltip.
ics_render --html-table --filepath tests/fixtures/early.ics --filepath tests/fixtures/late.ics > calendar-table.html
HTML list (--html-list)
A self-contained HTML page: each event is a spaced block with name, start, stop, duration, and the full description at the bottom (newlines rendered as line breaks).
ics_render --html-list --filepath tests/fixtures/early.ics --filepath tests/fixtures/late.ics > calendar-list.html
Tests
python -m pytest -q
Regenerating README screenshots
Screenshots under asset/screenshots/ are produced from the test fixtures using Brave in headless mode:
./make_screenshots
Requires brave (or adjust the browser command in the script). Intermediate .html files in asset/screenshots/ are updated at the same time. Text table and JSONL examples in this README are sample output from the same fixtures.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ics_render-0.1.1.tar.gz.
File metadata
- Download URL: ics_render-0.1.1.tar.gz
- Upload date:
- Size: 117.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
161ca552a62dcac760ccfaf71f31d8ea8f5c86200026ea5831cf240c12aac59f
|
|
| MD5 |
4d54ce10e412b76e268ea6deef1710f6
|
|
| BLAKE2b-256 |
d50cadb70856221320a37c8f583b51545f4861b9adfffff27ca653e289a76dde
|
File details
Details for the file ics_render-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ics_render-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5c75e03ac65c2e59d00d6ffac783aa21ce18570965c08b236497a5a4c24b4cd
|
|
| MD5 |
f8f425a7d878147098aaf135a707b636
|
|
| BLAKE2b-256 |
e1d4f12165a2c0e6c814aee0bc4fc4190bdbb846b81bf4b6f43a8bd9881a2729
|