Files
CalendarOverview/README.md
T
2026-07-17 20:23:52 +02:00

58 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CalendarOverview
Paste a Google Calendar ICS URL, see a two-year (current + next) overview.
Each day is split into three segments — morning (00:0012:00), afternoon
(12:0018:00), evening (18:0024:00) — that light up based on your events.
## Running it
```
npm install
npm start # http://localhost:3000
./start.sh # same, on port 4000
```
Optionally set `CALURL=<your ics url>` in a `.env` file (copy
`.env.example`) to have the URL prefilled on load. It's only used to prefill
the input server-side and is never logged.
## Tagging events with emoji
Start an event title with an emoji to color its segment. Emoji-to-color
mappings live in `tags.json`:
```json
{ "💜": { "label": "Tessa", "color": "magenta" } }
```
- One leading emoji not in `tags.json` still lights up (in a fallback
color) so it stands out from plain events.
- Two leading emoji (with or without a space between them, e.g. `✈️💜` or
`✈️ 💜`) split the segment into both colors.
- Events without a leading emoji still light their segment, just muted/grey.
- All-day events light all three segments for every day they span.
## Conflicts
If two tagged events overlap in time on the same day, that day is flagged
as a conflict. Add the standalone word `nc` anywhere in the title (e.g.
"Videobellen Caroline & Bas nc") to mark that event as intentionally
overlapping — it's excluded from conflict detection but still shows and
still gets colored normally.
## Timezones
All event times are displayed in Amsterdam local time, regardless of the
timezone the source event was created in (UTC, another IANA zone, etc.).
Events with no timezone info at all (a "floating" time per the ICS spec)
are shown as-is, unconverted.
## Tests
```
npm test
```
Plain `assert`-based script (`test_days.js`) covering recurrence expansion,
segment lighting, emoji tagging, and conflict detection.