2022-01-05 12:16:19 +00:00
|
|
|
|
# habitmove
|
2021-08-28 20:03:45 +00:00
|
|
|
|
|
2022-01-05 12:16:19 +00:00
|
|
|
|
Takes habit in one habit-tracking application and transforms them ready to use for another.
|
|
|
|
|
|
|
|
|
|
Currently can take an export of nomie habits in json format and convert it to be importable in Loop Habit Tracker.
|
|
|
|
|
Plans for reverse migration are on the roadmap, and ultimately this tool ideally understands more and more habit formats to prevent app lock-in.
|
2021-08-28 20:03:45 +00:00
|
|
|
|
|
2021-12-15 13:58:06 +00:00
|
|
|
|
Confirmed working for nomie version 5.6.4 and Loop Habit Tracker version 2.0.2 and 2.0.3.
|
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
|
|
|
|
|
2022-01-05 12:16:19 +00:00
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
|
|
Installation can be accomplished through *pip*:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
pip install habitmove
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Requirements:
|
|
|
|
|
|
|
|
|
|
`habitmove` requires at least Python 3.7.
|
|
|
|
|
It has only been tested on GNU/Linux (amd64) though it should work on other platforms.
|
|
|
|
|
|
2021-08-28 20:03:45 +00:00
|
|
|
|
## Usage
|
|
|
|
|
|
2022-01-05 12:16:19 +00:00
|
|
|
|
Run as a cli utility `habitmove` currently takes a single argument: the nomie database `.json` file to import habits from.
|
|
|
|
|
|
|
|
|
|
Invoked like: `habitmove nomie-export.json`.
|
|
|
|
|
|
|
|
|
|
The output as a Loop Habit Tracker database will be written to `output.db` in the present working directory.
|
2021-12-06 18:44:14 +00:00
|
|
|
|
|
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-12-15 13:58:06 +00:00
|
|
|
|
If there are any duplicated habits however,
|
|
|
|
|
it will add duplications of the existing repetitions into the database.
|
2021-08-28 20:03:45 +00:00
|
|
|
|
|
2022-01-05 12:16:19 +00:00
|
|
|
|
## Development
|
2021-09-30 15:19:29 +00:00
|
|
|
|
|
2022-01-05 12:16:19 +00:00
|
|
|
|
To enable easy development on the app,
|
|
|
|
|
install [poetry](https://python-poetry.org/) and let it do all dependency management for you by doing:
|
|
|
|
|
|
|
|
|
|
```bash
|
2021-09-30 15:19:29 +00:00
|
|
|
|
poetry install
|
|
|
|
|
poetry run habitmove <nomie-json>
|
|
|
|
|
```
|
2021-08-28 20:03:45 +00:00
|
|
|
|
|
2022-01-05 12:16:19 +00:00
|
|
|
|
To see a set up more closely resembling the final cli environment,
|
|
|
|
|
with its libraries loaded as environmental dependencies enter the poetry shell:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
poetry shell
|
|
|
|
|
```
|
2021-12-06 18:44:14 +00:00
|
|
|
|
|
2022-01-05 12:16:19 +00:00
|
|
|
|
The package can eventually also be used as a library to load nomie data to work with in Python,
|
|
|
|
|
or to move data into Loop Habit Tracker.
|
|
|
|
|
Take a look at the `Parser` and `Transformer` interfaces respectively.
|
2021-12-06 18:44:14 +00:00
|
|
|
|
|