2021-12-06 18:44:14 +00:00
|
|
|
|
# habit-migrate
|
2021-08-28 20:03:45 +00:00
|
|
|
|
|
|
|
|
|
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.
|
2021-09-30 15:19:29 +00:00
|
|
|
|
Presumably works for other nomie 5.x versions and other Loop 2.x versions as well,
|
|
|
|
|
but that is untested.
|
2021-08-28 20:03:45 +00:00
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
2021-12-06 18:44:14 +00:00
|
|
|
|
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.
|
|
|
|
|
|
2021-08-28 21:07:30 +00:00
|
|
|
|
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`,
|
2021-09-30 15:19:29 +00:00
|
|
|
|
it will not (should not™️) overwrite anything.
|
2021-08-28 20:03:45 +00:00
|
|
|
|
|
2021-09-30 15:19:29 +00:00
|
|
|
|
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.
|
2021-12-06 18:44:14 +00:00
|
|
|
|
If you wish to run it un-packaged, install [poetry](https://python-poetry.org/) and let it do all dependency management by doing:
|
2021-09-30 15:19:29 +00:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
poetry install
|
|
|
|
|
poetry run habitmove <nomie-json>
|
|
|
|
|
```
|
2021-08-28 20:03:45 +00:00
|
|
|
|
|
2021-12-06 18:44:14 +00:00
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
2021-12-06 15:37:59 +00:00
|
|
|
|
## Roadmap
|
|
|
|
|
|
|
|
|
|
* [ ] clean up README
|
2021-12-15 13:58:06 +00:00
|
|
|
|
* [x] begin adding tests
|
|
|
|
|
* [x] add some unit tests for various functions
|
2021-12-06 15:37:59 +00:00
|
|
|
|
* [ ] and at least an integration test for the stable database (loop-2021-12-02.db or equivalent)
|
2021-12-15 13:58:06 +00:00
|
|
|
|
* [ ] test most components
|
2021-12-06 15:37:59 +00:00
|
|
|
|
* [ ] abstract migration target away from loop
|
|
|
|
|
* [ ] abstract import away from nomie
|
|
|
|
|
* [ ] abstract importer/migrator themselves to work with other targets
|
|
|
|
|
* [ ] allow migration to/from nomie/loop
|
2021-12-15 13:58:06 +00:00
|
|
|
|
* [ ] cmdline options for
|
|
|
|
|
* [ ] ignoring/adding/overwriting duplicated timestamps
|
|
|
|
|
* [ ] output file
|
|
|
|
|
* [ ] from/to
|
2021-12-06 15:37:59 +00:00
|
|
|
|
|