Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active September 13, 2026 15:17
Show Gist options
  • Select an option

  • Save plembo/09c1795a57d86b4a06e3c8df8efaa546 to your computer and use it in GitHub Desktop.

Select an option

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!

Comments are disabled for this gist.