Migrate your habits from Nomie to Loop Habit Tracker.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
776 B

#!/usr/bin/env python
import habitmove.schema as schema
import habitmove.habits as habits
import habitmove.repetitions as rep
import habitmove.nomie as nomie
from habitmove.nomiedata import NomieImport
import click
from . import __version__
def migrate(data: NomieImport):
db = schema.migrate("output.db")
if not db:
raise ConnectionError
if data.trackers is not None:
habitlist = habits.migrate(db, data.trackers)
if data.events is not None:
rep.migrate(db, habitlist, data.events)
def main(inputfile):
data = nomie.get_data(inputfile)
if __name__ == "__main__":