z0.is
ICS2TSV(1) General Commands Manual ICS2TSV(1)

ics2tsvconvert an icalendar.ics file to tsv

ics2tsv [-1] [-f fields] [-s subsep] [-t timefmt] [file.ics...] >file.tsv

ics2tsv is a converter that parse icalendar format and produces lines of output. Every line represents an element delimited by “BEGIN:” and “END:” among “VEVENT”, “VTODO”, “VJOURNAL”, “VFREEBUSY”, and “VALARM”.

The lines are filled with tab-delimited fields, with the first ones:

  1. Element type, as encountered after “BEGIN” and “END”;
  2. Start date, present for “VEVENT”, “VJOURNAL”, “VFREEBUSY”, and “VALARM” types.
  3. End date, present for “VEVENT”, “VTODO”, “VFREEBUSY”, and “VALARM” types.
  4. Reserved for future use.

And the other fields starting from (5.) chosen by the -f flag. By default: “CATEGORIES,LOCATION,SUMMARY,DESCRIPTION”.

Show the name of the columns on the first line before the content.
field1,field2,field3...
Chooses the fields from the icalendar to display, in this order, separated by a comma (‘,’) and case-insensitive
subsep
When there are multiple fields with the same value, they are concatenated with subsep separator, by default a comma (‘,’).
timefmt
Dates from 2nd and 3rd fields are formatted with a strftime(3) string timeftm, by default in seconds since 1970/01/01.

TZ
Timezone to use for printing dates, as documented by tzset(3).

Split an file according to the category, saved as .tsv:

ics2tsv -f CATEGORIES icalendar.ics | awk -F '\t' '{ print >>($6".tsv") }´

cal(1), calendar(1), date(1), tsv2agenda(1), tzset(3)

Desruisseaux, Internet Calendaring and Scheduling Core Object Specification (iCalendar), RFC 5545, September 2009.

Josuah Demangeon <me@josuah.net>

March 1, 2020 OpenBSD 6.9
TSV2ICS(1) General Commands Manual TSV2ICS(1)

tsv2icsconvert ics file to simpler tsv or txt formats

tsv2ics <file.ics >file.txt

tsv2ics convert a tab-separated value input as produced by ics2tsv(1) and produce iCalendar formatted output. The dates are formatted in UTC timestamps.

Only keep the dates and “SUMMARY” from an iCalendar:

ics2tsv -f SUMMARY icalendar.ics | tsv2ics

cal(1), calendar(1), ics2tsv(1), tsv2agenda(1)

Desruisseaux, Internet Calendaring and Scheduling Core Object Specification (iCalendar), RFC 5545, September 2009.

Josuah Demangeon <me@josuah.net>

March 1, 2020 OpenBSD 6.9
TSV2AGENDA(1) General Commands Manual TSV2AGENDA(1)

tsv2agendaconvert TSV input to a visual agenda roll

tsv2agenda [-f fromdate] [-t todate]

tsv2agenda is a converter that reads tsv format as produced by ics2tsv(1) and represents an aligned text agenda from it.

Every column (after the 4th one) present on the input is displayed on the output (if not empty).

fromdate
Show only events starting from fromdate. By default the current time: showing all future events.
todate
Show only events up to todate. By default show all future events.

TZ
Timezone to use for printing dates, as documented by tzset(3).

Show the events from a icalendar.ics file sorted by start date:

curl $url.ics | ics2tsv | sort -n -k 1,1 | tsv2agenda

cal(1), calendar(1), ics2tsv(1), tsv2ics(1), tzset(3)

Josuah Demangeon <me@josuah.net>

March 1, 2020 OpenBSD 6.9