A simple Go utility to convert iCalendar (.ics) files to CSV format.
- Parses .ics files and extracts event details
- Outputs events in CSV format for easy import into spreadsheets
- CLI usage for quick conversion
$ ics2csv --help
Usage: ics2csv <input.ics> [--output <output.csv>|stdout]
-m, --multiline Preserve newlines and whitespace in fields
-o, --output string Output CSV file (default: input name with .csv extension, or 'stdout')
$ ics2csv input.ics
The output will be saved to input.csv
by default.
You can also specify the output file name or use stdout
to print to the console.
By default, all fields are converted to a single line (all whitespace and newlines are replaced by a single space).
If you want to preserve newlines and whitespace in fields, use the --multiline
(or -m
) flag:
$ ics2csv --multiline input.ics
The CSV file contains the following columns:
- Subject
- Start Date
- Start Time
- End Date
- End Time
- Description
- Location
You can download the executable for your platform from the Releases.
$ go install github.com/kpym/ics2csv@latest
After cloning this repo you can compile the sources with goreleaser for all available platforms:
git clone https://github.com/kpym/ics2csv.git .
goreleaser --snapshot --skip-publish --clean
You will find the resulting binaries in the dist/
sub-folder.
This tool is mainly using github.com/arran4/golang-ical to parse the .ics files.
MIT