Turning Calendar Data Into Daily Notes With cal-dump.py
Dump formatted ICS calendar events into daily note.
Im tracking a lot of things in my calendar, and I wanted to have them in my Obsidian notes too. cal-dump.py does that in one command: sync calendars, pull out events, format them, and write them into note files.
Script: GitLab: scripts/.local/bin/cal-dump.py · master · Fabian Untermoser / dot-file
Prerequisites
- vdirsyncer to sync calendar files to
~/.calendars/*/*.ics - Python deps available:
icalendar,recurring_ical_events,tabulate - For
--daily:NOTES_DIRpoints to your notes folder and is a clean git repo
How to use it
Basic Usage
# sync calendars, write to daily notes, from start date until today
cal-dump.py --sync --daily --from 2025-08-30 --toBasic Usage
# dump single day to stdout
cal-dump.py 2025-09-04
cal-dump.py 2025-09-04 ~/.calendars/calendar.ics
cal-dump.py 2025-09-04 --calendar-root ~/.calendars
# dump date range to stdout
cal-dump.py 2025-09-04 --days 10
cal-dump.py --from 2025-09-04 --to 2025-09-30
# format date to file
cal-dump.py 2025-09-04 -f 2025-09-04.md
# write to daily note 2025-09-04.md in ~/notes
cal-dump.py --daily 2025-09-04
cal-dump.py --daily 2025-09-04 --notes-dir ~/notesHelp
usage: cal-dump.py [-h] [--days DAYS | --to [END_DATE]] [--from START_DATE] [--sync]
[--calendar-root CALENDAR_ROOT] [--notes-dir NOTES_DIR] [-v] [-f FILE | --daily]
[DATE] [CALENDAR_FILES ...]
Dump ICS calendar events into daily note
positional arguments:
DATE start date in yyyy-mm-dd format (required unless --from is used)
CALENDAR_FILES calendar files (defaults to /home/fabian/.calendars/*/*.ics)
options:
-h, --help show this help message and exit
--days DAYS number of additional days to process (inclusive range)
--to [END_DATE] process DATE through END_DATE (inclusive); if END_DATE is omitted, uses today
--from START_DATE use START_DATE as start date (yyyy-mm-dd)
--sync run "vdirsyncer sync" before processing
--calendar-root CALENDAR_ROOT
default source for calendars when CALENDAR_FILES are omitted (default:
/home/fabian/.calendars)
--notes-dir NOTES_DIR
notes folder for --daily mode (default: /home/fabian/notes)
-v, --verbose Enable verbose mode
-f, --file FILE specific note file to write
--daily write to daily note
examples:
cal-dump.py 2024-12-27 ~/.calendars/*/*.ics
cal-dump.py --daily 2024-12-27 ~/.calendars/*/*.ics
cal-dump.py --daily --days 31 2025-08-30 ~/.calendars/*/*.ics
cal-dump.py --daily --from 2025-08-30 ~/.calendars/*/*.ics
cal-dump.py --daily --from 2025-08-30 --to 2025-09-30 ~/.calendars/*/*.ics
cal-dump.py --daily 2025-08-30 --to 2025-09-30 ~/.calendars/*/*.ics
cal-dump.py --sync --daily --days 31 2025-08-30