
# Ionical - keeping an eye on icals

## Installing via pip:
```
$ pip install ionical
```

## Command line usage:
```
Usage: ionical [-h] [-v] 
               [-g] [-s] [-l] [-c CSV_FILE] 
               [-i IDS [IDS ...]] 
               [-t TEXT_FILTERS [TEXT_FILTERS ...]] [-a START_DATE] [-b END_DATE] 
               [-f CALENDAR_LIST_FILE] [-d DIRECTORY]
               [-n NUM_LOOKBACKS] [-x CSV_CONVERSION_FILE]


Help / Version Info:
  -h, --help            Print help message, then exit (ignoring below options).
  -v, --version         Print ionical version, then exit (ignoring below options).

Main Operations (can specify one or more, but at least one MUST be specified):
  -g, --get_today       Download current .ics files and label them with today's date. 
                        This will be done prior to running any other Main Operations. 
                        (If not specified, operations will use only .ics files 
                        which have previously been downloaded.)
  -s, --schedule        Display events from the most recent version of each calendar.
  -l, --changelog       Show changelog(s) between schedule versions from multiple dates.
  -c CSV_FILE, --csv_file CSV_FILE
                        Export current schedules to CSV_FILE (alpha status).

Calendar Filter Options (applies to all Main Operations):
  -i IDS [IDS ...], --ids IDS [IDS ...]
                        Only operate on calendars specified in the list of calendar IDS. 
                        (An ID is a 'nickname' specified in the calendar list config file.) 
                        (Default behavior: no restrictions. I.e., include all calendars  
                        listed in the config file.)

Event Filter Options (for changelogs, viewing schedules, and csv export):
  -t TEXT_FILTERS [TEXT_FILTERS ...], --text_filters TEXT_FILTERS [TEXT_FILTERS ...]
                        Filter EVENTS by text that appears in event summary field.  
                        (Default behavior: no text filters.)
  -a START_DATE, --start_date START_DATE
                        Apply actions only to EVENTS occuring AFTER specified date.  
                        Value must be EITHER a date in format YYYY-MM-DD, or a positive 
                        integer representing # of days before today. 
                        (Default behavior: 1 days before today's date.)
  -b END_DATE, --end_date END_DATE
                        Apply actions only to EVENTS occuring BEFORE specified date. 
                        Value must be EITHER a date in format YYYY-MM-DD, or a positive 
                        integer representing # of days after today.
                        (Default behavior: no filter)

General File/Directory Configuration Options:
  -f CALENDAR_LIST_FILE, --calendar_list_file CALENDAR_LIST_FILE
                        Filename containing list of calendars with associated info.
                        (In JSON format: [[NICKNAME, FULLNAME, URL, TIME_ZONE], ... ] )
                        (Default: ./calendar_list.json)
  -d DIRECTORY, --directory DIRECTORY
                        Directory where downloaded .ics files are stored.
                        (Default: ./)

Changelog Options (only applicable when -l option also specified):
  -n NUM_LOOKBACKS, --num_lookbacks NUM_LOOKBACKS
                        Number of past schedule versions (per person) to compare.  
                        [Only used when displaying changelogs with -l option.]  
                        (Default behavior: 2 'lookbacks')

CSV Options (only applicable when -c option also specified):
  -x CSV_CONVERSION_FILE, --csv_conversion_file CSV_CONVERSION_FILE
                        JSON file w/ dictionary of conversion terms. 
                        [Only used when generating CSV via -c option.]
                        (Default: ./csv_conversion_table.json)
```

## Installing from respository:
```
$ git clone https://github.com/danyul/ionical
$ cd ionical
$ python -m venv env
$ source env/bin/activate
$ pip install -e ".[test]"
```
If on Windows, replace 'source env/bin/activate' with:
```
$ .\env\Scripts\activate
```

# Note:

ionical has been successfully used to track schedules changes 
in ics files generated by Amion (http://amion.com/).  However, it has
not been extensively tested on ics files from other sources.

