Migrate your habits from Nomie to Loop Habit Tracker.
Go to file
Marty Oehme fd4cd62636
Add README for internal data representation
2022-01-05 12:54:35 +01:00
src/habitmove Add version extraction to parser 2021-12-25 10:27:38 +01:00
tests Add version extraction to parser 2021-12-25 10:27:38 +01:00
.gitignore Prepare pytest for end-to-end testing 2021-12-16 13:07:42 +01:00
CHANGELOG.md Make program downward compatible until python 3.7 2021-12-15 22:34:30 +01:00
README.md Add README for internal data representation 2022-01-05 12:54:35 +01:00
noxfile.py Prepare pytest for end-to-end testing 2021-12-16 13:07:42 +01:00
poetry.lock Make program downward compatible until python 3.7 2021-12-15 22:34:30 +01:00
pyproject.toml Make program downward compatible until python 3.7 2021-12-15 22:34:30 +01:00

README.md

habit-migrate

Can take an export of nomie habits in json format and convert it to be importable in Loop Habit Tracker.

Confirmed working for nomie version 5.6.4 and Loop Habit Tracker version 2.0.2 and 2.0.3. Presumably works for other nomie 5.x versions and other Loop 2.x versions as well, but that is untested.

Usage

Run as a commandline utility habit migrate currently takes a single argument, the nomie database .json file. The output as importable Loop Habit Tracker database will be written to output.db in present working directory.

Can also take an existing Loop Habit database (exported from the application), and add the nomie exported habits and checkmarks to it. Simply put the exported Loop database in the same directory and call it output.db, it will not (should not™️) overwrite anything. If there are any duplicated habits however, it will add duplications of the existing repetitions into the database.

Invoked like: python run.py nomie-export.json. Note, however, that -- until a packaged version is released -- you will need to have some packages in your environment. If you wish to run it un-packaged, install poetry and let it do all dependency management by doing:

poetry install
poetry run habitmove <nomie-json>

In the future there might be an easier road to using this package but that's the way it is for now.

The package can also be used as a library to load nomie data or move data into Loop Habit Tracker.

Internal representation

Internally, the data gets represented within three concepts: Events, Activities and Trackers.

Events are simple entries or logs of, basically, anything and represent qualitative data. At their most basic, they only describe 'something' at a certain point in time. For that, they have to contain a time and they may contain prose text (i.e. an arbitrary text string). Additionally, an event can contain a list of one or more activities.

Activities are the changes to whatever is tracked quantitatively. They always belong to an event and thus the moment in time the event took place. They might even be the only interesting thing that took place in the event, but not necessarily. Lastly, they contain a single tracker which they belong to.

Trackers are the meta-data of whatever is being tracked quantitatively through activities. They define a name, label, scores, descriptions, reminders and so on. All data being imported is transformed into this model and output from it again.