Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active March 2, 2025 21:11
Show Gist options
  • Save plembo/09c1795a57d86b4a06e3c8df8efaa546 to your computer and use it in GitHub Desktop.
Save plembo/09c1795a57d86b4a06e3c8df8efaa546 to your computer and use it in GitHub Desktop.
icsp ics to tsv converter in bash

icsp: a ICS to TSV converter

Alexandre Lotte, the author of icsp describes it as a "Small, fast and simple command-line tool to conver calendar exports (.ics files) into TSV/CSV files for easy analysis and usage in broader use-cases."

And so it is.

I had accidentally imported a holiday calendar into my default Proton Calendar, when I realized two very horrible things: (1) I had no backup; and (2) no one really provides tools for removing entries from calendars in bulk. Later, I would add "Proton Calendar doesn't have a versioning system". But then, no one else does either.

I was screwed.

A few minutes (OK, about a half hour) of searching the Internet, and I found icsp: which turned out to be everything its author wrote that it is.

$ icsp MyCalendar.ics > MyCalendar.tsv

Load up MyCalendar.tsv into LibreOffice Calc, sort on SUBJECT, remove the offending rows (around 100 or so) and then Save. Then convert back to ics:

$ icsp -r MyCalendar.tsv > NewCalendar.ics

(the "-r" option tells icsp to reverse the conversion process from TSV to ICS, it is required)

Then import into Proton Calendar.

Voila!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment