Add GUI desktop application
- Add gui/ package: CustomTkinter app with dashboard, mods, tools, logs, and settings views; first-run SetupWizard for config.json generation - Add gui.py root entry point (calls gui.run_app()) - Add selection.json for GUI selection state persistence - Add customtkinter to requirements.txt - Fix link_mods.py minor issues surfaced during GUI integration - Add modlist_html/Test_Preset_A.html and Test_Preset_B.html as example inputs - Update README.md: add GUI prerequisites, gui.py script section, gui/ folder structure, customtkinter to prerequisites table - Update CLAUDE.md: add python gui.py to common commands, document GUI package architecture and views Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
17
link_mods.py
17
link_mods.py
@@ -99,7 +99,7 @@ def cmd_link(cfg, group: str) -> None:
|
||||
print()
|
||||
|
||||
|
||||
def cmd_unlink(cfg, group: str) -> None:
|
||||
def cmd_unlink(cfg, group: str, yes: bool = False) -> None:
|
||||
group_dir = cfg.downloads / group
|
||||
if not group_dir.is_dir():
|
||||
print(f"ERROR: group folder not found: {group_dir}")
|
||||
@@ -118,10 +118,13 @@ def cmd_unlink(cfg, group: str) -> None:
|
||||
print(f" Group: {group} ({linked_count} linked mod(s))")
|
||||
print()
|
||||
|
||||
choice = input(" Continue? [y/N]: ").strip().lower()
|
||||
if choice not in ("y", "yes"):
|
||||
print(" Aborted.\n")
|
||||
sys.exit(0)
|
||||
if yes:
|
||||
print(" (--yes flag set — skipping confirmation)")
|
||||
else:
|
||||
choice = input(" Continue? [y/N]: ").strip().lower()
|
||||
if choice not in ("y", "yes"):
|
||||
print(" Aborted.\n")
|
||||
sys.exit(0)
|
||||
|
||||
print()
|
||||
|
||||
@@ -158,6 +161,8 @@ def main() -> None:
|
||||
)
|
||||
parser.add_argument("command", choices=["status", "link", "unlink"])
|
||||
parser.add_argument("--group", "-g", metavar="GROUP")
|
||||
parser.add_argument("--yes", "-y", action="store_true",
|
||||
help="Skip confirmation prompt (for non-interactive use)")
|
||||
args = parser.parse_args()
|
||||
|
||||
if not args.group:
|
||||
@@ -176,7 +181,7 @@ def main() -> None:
|
||||
elif args.command == "link":
|
||||
cmd_link(cfg, args.group)
|
||||
elif args.command == "unlink":
|
||||
cmd_unlink(cfg, args.group)
|
||||
cmd_unlink(cfg, args.group, yes=args.yes)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user