mirror of
https://git.webmeisterei.com/webmeisterei/todoist-taskwarrior.git
synced 2023-12-21 10:23:00 +01:00
Add basic --interactive capability - confirm each task
This commit is contained in:
parent
48e7a5f6f5
commit
3fa28b44d1
@ -18,7 +18,7 @@ def cli(todoist_api_key):
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.option('-i', '--interactive', default=False)
|
||||
@click.option('-i', '--interactive', is_flag=True, default=False)
|
||||
@click.option('--no-sync', is_flag=True, default=False)
|
||||
def migrate(interactive, no_sync):
|
||||
if not no_sync:
|
||||
@ -29,6 +29,9 @@ def migrate(interactive, no_sync):
|
||||
tasks = todoist.items.all()
|
||||
important(f'Starting migration of {len(tasks)}...')
|
||||
for task in todoist.items.all():
|
||||
if interactive and not click.confirm(f"Import '{task['content']}'?"):
|
||||
continue
|
||||
|
||||
add_task(task)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user