mirror of
https://git.webmeisterei.com/webmeisterei/todoist-taskwarrior.git
synced 2023-12-21 10:23:00 +01:00
Add --no-sync option to disable todoist.sync()
This commit is contained in:
parent
b0f4ca3843
commit
48e7a5f6f5
13
migrate.py
13
migrate.py
@ -19,12 +19,15 @@ def cli(todoist_api_key):
|
||||
|
||||
@cli.command()
|
||||
@click.option('-i', '--interactive', default=False)
|
||||
def migrate(interactive):
|
||||
important('Starting migration...')
|
||||
# todoist.sync()
|
||||
tasks = todoist.items.all()
|
||||
@click.option('--no-sync', is_flag=True, default=False)
|
||||
def migrate(interactive, no_sync):
|
||||
if not no_sync:
|
||||
important('Syncing tasks with todoist... ', nl=False)
|
||||
todoist.sync()
|
||||
success('OK')
|
||||
|
||||
info(f'Todoist tasks: {len(todoist.items.all())}')
|
||||
tasks = todoist.items.all()
|
||||
important(f'Starting migration of {len(tasks)}...')
|
||||
for task in todoist.items.all():
|
||||
add_task(task)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user