csv2ical

A CLI tool that converts a CSV file with event details into an iCalendar ICS file. The ICS file can then be imported into apps like Google Calendar, Microsoft Outlook, Apple macOS Calendar and etc.

https://github.com/rlan/csv2ical

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.1%) to scientific vocabulary

Keywords

comand-line-tool converter converter-cli csv google-calendar ical icalendar macos-calendar microsoft-outlook python python3 text-processing
Last synced: 6 months ago · JSON representation ·

Repository

A CLI tool that converts a CSV file with event details into an iCalendar ICS file. The ICS file can then be imported into apps like Google Calendar, Microsoft Outlook, Apple macOS Calendar and etc.

Basic Info
  • Host: GitHub
  • Owner: rlan
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 43.9 KB
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
comand-line-tool converter converter-cli csv google-calendar ical icalendar macos-calendar microsoft-outlook python python3 text-processing
Created over 7 years ago · Last pushed 10 months ago
Metadata Files
Readme Funding License Citation

README.md

csv2ical

Python versions MIT license uv Ruff CI badge DOI

A CLI tool that converts a CSV file with event details into an iCalendar ICS file. The ICS file can then be imported into apps like Google Calendar, Microsoft Outlook, Apple macOS Calendar and etc.

Installation

First, install uv.

Then:

sh uv tool install git+https://github.com/rlan/csv2ical

Verify installation:

sh uv tool list

txt csv2ical v1.0.1 - csv2ical

Usage

sh csv2ical --help

```txt Usage: csv2ical [OPTIONS] CSVNAME ICSNAME

Convert a CSV file to an ICS file.

Convert a CSV file with event details to an iCalendar ICS file, which can be imported into apps like Google Calendar, Microsoft Outlook, Apple macOS Calendar and etc.

CSV_NAME is the file name of a CSV file with event details.

ICS_NAME is the resulting iCalendar ICS file.

Options: --version Show the version and exit. --help Show this message and exit. ```

Example:

sample.csv:

csv "Subject","Start Date","Start Time","End Date","End Time","Description","Location" "Harry Potter birthday","1980-07-31","00:00","1980-08-01","00:00","The Chosen One","Godric's Hollow" "Ron Weasley birthday","1980-03-01","00:00","1980-03-02","00:00","Won-Won","Ottery St Catchpole" "Hermione Granger birthday","1979-09-19","00:00","1979-09-20","00:00","'Mione",""

An all-day event starts at midnight and ends at the midnight of the next day. Although sample.csv contains only all-day events, e.g. birthdays, any shorter events, e.g. meetings, would also work.

The names in the CSV header row is documentation. It tells the author of the CSV file which column to write the event details. Editing that row has no effect on the output ICS file, but do not omit it.

Reproduce sample.ics:

sh csv2ical sample.csv sample.ics

sh cat sample.ics

txt BEGIN:VCALENDAR VERSION:2.0 PRODID:-//sample.csv//mxm.dk// BEGIN:VEVENT SUMMARY:Harry Potter birthday DTSTART;VALUE=DATE-TIME:19800731T000000 DTEND;VALUE=DATE-TIME:19800801T000000 DESCRIPTION:The Chosen One LOCATION:Godric's Hollow END:VEVENT BEGIN:VEVENT SUMMARY:Ron Weasley birthday DTSTART;VALUE=DATE-TIME:19800301T000000 DTEND;VALUE=DATE-TIME:19800302T000000 DESCRIPTION:Won-Won LOCATION:Ottery St Catchpole END:VEVENT BEGIN:VEVENT SUMMARY:Hermione Granger birthday DTSTART;VALUE=DATE-TIME:19790919T000000 DTEND;VALUE=DATE-TIME:19790920T000000 DESCRIPTION:'Mione LOCATION: END:VEVENT END:VCALENDAR

Update to a new version

sh uv tool upgrade csv2ical

Uninstallation

sh uv tool uninstall csv2ical

Development

See development.md

Citation

If this project helps your research, don't hesitate to spread the word! Click on the badge below and find citation formats (e.g., BibTeX and etc) at the bottom of that page.

DOI

License

MIT

Owner

  • Name: Rick Lan
  • Login: rlan
  • Kind: user

Citation (CITATION.cff)

abstract: <p>Convert a CSV file with event details into an iCalendar ICS file. The
  ICS file can then be imported into apps like Google Calendar, Outlook, or macOS
  Calendar.</p>
authors:
- family-names: Lan
  given-names: Rick
  orcid: 0000-0003-2830-2820
cff-version: 1.2.0
date-released: '2025-01-23'
doi: 10.5281/zenodo.15024834
license:
- mit
title: Convert a CSV file with event details into an iCalendar ICS file.
type: software
version: '20250123'

GitHub Events

Total
  • Issues event: 6
  • Watch event: 3
  • Issue comment event: 2
  • Push event: 29
  • Create event: 3
Last Year
  • Issues event: 6
  • Watch event: 3
  • Issue comment event: 2
  • Push event: 29
  • Create event: 3

Dependencies

requirements.txt pypi
  • icalendar >=4.0.1
.github/workflows/tests.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite