Config¶
daylio-parser comes with a default config that works for the
default Daylio setup after installing the app. That is, there’s
just 5 moods, called awful, bad, meh, good, rad
.
Each mood has its class:
-
class
Mood
¶ -
name
: str¶ Name of the mood, must correspond with mood name in the exported CSV.
-
level
: int¶ Assigned numeral level for the mood (higher = better mood).
-
color
: str¶ Any hex color.
-
boundaries
: Tuple[float, float]¶ A tuple with lower and upper bound for the mood. Any average mood that falls withing these boundaries will be colored using the
Mood.color
.
-
The whole mood config for your app will be constructed using the
MoodConfig
class.
-
class
MoodConfig
(mood_list=None)¶ Creates a config with mood_list. If the mood list isn’t provided,
DEFAULT_MOODS
will be used. All moods are automatically numbered (levels are assigned) and boundaries are also calculated. Each boundary is exactly 1 in size, with the first one and the last one being only 0.5 in size.- Parameters
mood_list (List[Tuple[str, str]]) – A list of moods with (name, color)
-
from_list
(mood_list) → None¶ Updates the config with a new list of moods.
- Parameters
mood_list (List[Tuple[str, str]]) – A list of moods with (name, color)