Commit Graph

7 Commits

Author SHA1 Message Date
Marty Oehme 3da96a3ef8
Add all simultaneous activities to loop
While in nomie, multiple occurences of the same activity can be recorded
in one single event (e.g. you smoked multiple cigarettes and now record
that fact), Loop has no such concept.

Thus, we work around it by fudging the duplicate timestamps ever so
slightly (one millisecond each) and then adding them to the database.
2021-12-06 20:40:37 +01:00
Marty Oehme 2dbc6945a2
Improve sqlite3 connection creation 2021-12-06 20:39:06 +01:00
Marty Oehme 76b2dd4408
Make nomie dataclasses immutable 2021-12-06 20:39:06 +01:00
Marty Oehme 76bedd42ee
Refactor data into dataclasses 2021-12-06 20:39:05 +01:00
Marty Oehme c5b532b618
Refactor nomie data ingestion 2021-12-02 18:54:56 +01:00
Marty Oehme 0e31975cb0
Create missing PRAGMA values
Created missing schema_version and user_version values for import.
user_version is especially important here since Loop Habit looks for the
corresponding sql schema migration files and does not find files for
versions under 9.

user_version = 23 or 24 seems correct for Loop Habit Tracker v2.0.3 (or
rather, 2.0.x).

Migration files here:
https://github.com/iSoron/uhabits/tree/dev/uhabits-core/src/jvmMain/resources/migrations

Used by migration helper, with an error message on non-existing version
file here:
https://github.com/iSoron/uhabits/blob/dev/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/database/MigrationHelper.kt
2021-12-02 12:54:11 +01:00
Marty Oehme bea6c0eca5
Fix ability to be run via poetry and cli
Program can now be invoked through poetry for development purposes,
invoke as follows from main directory: `poetry run move`.

Alternatively, can still be invoked via `python run.py <nomie-json>` and
now via `./run.py <nomie-json>` which uses system default python
installation. For now both commands are only mainly useful from the
poetry development virtual environment itself.
2021-10-07 10:17:42 +02:00