daylio-csv-parser

Configuration

Config files

This project uses Pythonโ€™s built-in ConfigParser format, which is easy for end-users to edit.

The clean_csv.py script will dynamically handle any number of activities in the activities column without any configuration needed. However, the labels for moods should be configured, as below. Also, you may optionally override any paths for CSV and DB files.

View the built-in app.conf config file to see what options can be set. Do not edit this file. It contains the base values.

$ view dayliopy/etc/app.conf

Customize the app by creating an unversioned local config file, which will override any fields in app.conf file.

$ nano dayliopy/etc/app.local.conf

Or use the template as a starting point:

$ cp dayliopy/etc/app.template.conf dayliopy/etc/app.local.conf

CSV input

Default

The default location for the input CSV is this, as set in app.conf

dayliopy/var/data_in/daylio_export.csv

Custom

You can override to a custom location:

[data]
source_csv: source_csv: %(var_dir)s/data_in/my_export.csv

Sample files for development

Point to one of the sample files in version control. This is useful for developers testing this app.

[data]
source_csv: %(app_dir)s/sample.csv
[data]
source_csv: %(app_dir)s/sample_multiple_moods.csv

Configuring moods

The Daylio app lets you override the labels for moods, which then appears in your export.

If you do that, you need to configure this Dayliopy tool to know which level from 1 to 5 corresponds to that label.

So set the moods in the [daylio] section to exactly match the labels in your CSV. You only need to set values in the local config if they differ from the base config.

Default

Leave the section empty in your config.

[daylio]

Override one

You could replace mood level 3 from "meh" default in Daylio with "average".

[daylio]
mood3: average

Override all

[daylio]
mood5: rad
mood4: good
mood3: average
mood2: bad
mood1: yuck

Multiple moods for the same score

If you use more than 5 moods and want to map multiple labels for the same level, you can configure this in the config too.

For example, if you had you had average and meh both with a score of 3/5 and sad and bad both get a score of 2.

mood5: amazing
mood4: happy
mood3: average,meh
mood2: sad, bad
mood1: horrible

Note use of comma to separate values. Whitespace around the comma will be ignored.

NB. Make sure in the Daylio app itself to not use a comma in your label, as that would break this.