fix
This commit is contained in:
@@ -801,6 +801,59 @@ def status():
|
||||
os.unlink(pid_file)
|
||||
|
||||
|
||||
@sync.command(name="interactive")
|
||||
@click.option(
|
||||
"--org",
|
||||
help="Specify the organization name for the subfolder to store emails and calendar events",
|
||||
default="corteva",
|
||||
)
|
||||
@click.option(
|
||||
"--vdir",
|
||||
help="Output calendar events in vdir format to the specified directory",
|
||||
default="~/Calendar",
|
||||
)
|
||||
@click.option(
|
||||
"--notify/--no-notify",
|
||||
help="Send macOS notifications for new email messages",
|
||||
default=True,
|
||||
)
|
||||
@click.option(
|
||||
"--dry-run",
|
||||
is_flag=True,
|
||||
help="Run in dry-run mode without making changes.",
|
||||
default=False,
|
||||
)
|
||||
@click.option(
|
||||
"--demo",
|
||||
is_flag=True,
|
||||
help="Run with simulated sync (demo mode)",
|
||||
default=False,
|
||||
)
|
||||
def interactive(org, vdir, notify, dry_run, demo):
|
||||
"""Launch interactive TUI dashboard for sync operations."""
|
||||
from .sync_dashboard import run_dashboard_sync
|
||||
|
||||
sync_config = {
|
||||
"org": org,
|
||||
"vdir": vdir,
|
||||
"notify": notify,
|
||||
"dry_run": dry_run,
|
||||
"days_back": 1,
|
||||
"days_forward": 30,
|
||||
"download_attachments": False,
|
||||
"two_way_calendar": False,
|
||||
"continue_iteration": False,
|
||||
"icsfile": None,
|
||||
}
|
||||
asyncio.run(
|
||||
run_dashboard_sync(notify=notify, sync_config=sync_config, demo_mode=demo)
|
||||
)
|
||||
|
||||
|
||||
# Alias 'i' for 'interactive'
|
||||
sync.add_command(interactive, name="i")
|
||||
|
||||
|
||||
def check_calendar_changes(vdir_path, org):
|
||||
"""
|
||||
Check if there are local calendar changes that need syncing.
|
||||
|
||||
Reference in New Issue
Block a user