rename: cloud sync -> instance sync; cloud -> Timemachine Network; drop Tk
CI / test (3.10) (push) Successful in 7s
CI / test (3.11) (push) Successful in 7s
CI / test (3.12) (push) Successful in 7s
CI / build-pyz (push) Successful in 4s
CI / release (push) Has been skipped

Product / UI / CLI / docs rebrand. Internal package, repo, and
on-disk dir names stay 'cloud_sync' / 'cloud-sync' / '.cloud-sync/'
to avoid breaking existing installs; a future commit can do the
file-system rename when the cost is worth paying.

User-facing changes:
  CLI prog name:        cloud-sync     -> instance-sync
  CLI description:      cloud-svc URL  -> Timemachine Network endpoint
  Dialog title:         CLOUD SYNC     -> INSTANCE SYNC
  Dialog title:         CLOUD CONFLICT -> INSTANCE CONFLICT
  Dialog title:         CONNECT CLOUD SAVE -> CONNECT TO THE NETWORK
  Card label:           Cloud Save     -> Remote Save
  Skip button:          Skip cloud sync -> Skip instance sync
  Body copy:            'the cloud'    -> 'the Timemachine Network'
  Window titles:        Cloud sync — ... -> Instance sync — ...
  Log prefix:           cloud-sync:    -> instance-sync:
  Error prose:          'cloud-sync token' -> 'instance-sync token'

Backend changes:
  restic --host tag:    cloud-sync     -> instance-sync
  State.host_tag dflt:  cloud-sync     -> instance-sync
  (Existing snapshots with the old tag still pull fine; we use 'latest'.)

Drop tkinter fallback: ui.py now offers Qt OR Headless. tkinter is
unnecessary given we already maintain Qt + headless; one less code
path to keep styled, smaller pyz. make_progress() picks Qt first,
falls through to HeadlessProgress on ImportError with a stderr hint
to 'pip install PySide6'.

README: rebrand title + prose; note repo/dir rename deferred; call
out the PySide6 install step. Conflict/login dialogs are now Qt-only;
without Qt, conflict aborts (defensive) and login tells the user to
paste the token manually.

52 tests green; no test-file label changes needed since they only
exercise internal APIs.
This commit is contained in:
2026-06-05 01:14:02 +02:00
parent f1cb9f4b86
commit b31fdd023a
10 changed files with 99 additions and 232 deletions
+9 -9
View File
@@ -27,17 +27,17 @@ class Args:
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(
prog="cloud-sync",
description="Per-user Minecraft state sync via restic.",
prog="instance-sync",
description="Per-user Minecraft instance sync via the Timemachine Network.",
)
p.add_argument("--version", action="version", version="cloud-sync 0.1.0")
p.add_argument("--version", action="version", version="instance-sync 0.1.0")
sub = p.add_subparsers(dest="cmd", required=True)
for name in ("pull", "push"):
sp = sub.add_parser(name, help=f"{name} player state")
sp = sub.add_parser(name, help=f"{name} instance state")
sp.add_argument(
"--url", required=True,
help="cloud-svc data plane URL (e.g. https://cloud.tm.center)",
help="Timemachine Network endpoint (e.g. https://cloud.tm.center)",
)
sp.add_argument(
"--pack-folder", default=".", type=Path,
@@ -57,7 +57,7 @@ def build_parser() -> argparse.ArgumentParser:
)
sp.add_argument(
"-g", "--no-gui", action="store_true",
help="Headless mode (no Swing/Qt windows, restic stdout only)",
help="Headless mode (no Qt windows; status to stdout only)",
)
return p
@@ -93,13 +93,13 @@ def main(argv: list[str] | None = None) -> int:
action = {"pull": sync.pull, "push": sync.push}[cmd]
progress = ui.make_progress(headless=args.headless)
title = "Cloud sync — pulling" if cmd == "pull" else "Cloud sync — pushing"
title = "Instance sync — pulling" if cmd == "pull" else "Instance sync — pushing"
try:
return progress.run_with(lambda: action(args, progress), title)
except KeyboardInterrupt:
print("cloud-sync: cancelled", file=sys.stderr)
print("instance-sync: cancelled", file=sys.stderr)
return 1
except Exception as e: # noqa: BLE001
print(f"cloud-sync {cmd}: {e}", file=sys.stderr)
print(f"instance-sync {cmd}: {e}", file=sys.stderr)
return 2