diff --git a/README.md b/README.md index 9c59f36..948a53d 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ underscores instead of spaces. the current working directory. -l PATH Write debug log to specified path. -m Generate a minimized sheet without WFEs and embassies +-maj LENGTH Specify custom length of major update, in seconds. +-min LENGTH Specify custom length of minor update, in seconds. If run without arguments, Spyglass runs in interactive mode and outputs to its working directory. diff --git a/Spyglass-cli.py b/Spyglass-cli.py index 720df64..89cae01 100644 --- a/Spyglass-cli.py +++ b/Spyglass-cli.py @@ -87,6 +87,8 @@ def download_dump() -> None: the current working directory. -l PATH Write debug log to specified path. -m Generate a minimized sheet without WFEs and embassies + -maj LENGTH Specify custom length of major update, in seconds. + -min LENGTH Specify custom length of minor update, in seconds. """ ) print( @@ -109,6 +111,14 @@ def download_dump() -> None: if "-n" in argv: interactive = False UAgent = argv[argv.index("-n") + 1] + + if "-min" in argv: + MinorTime = int(argv[argv.index("-min") + 1]) + if "-maj" in argv: + MajorTime = int(argv[argv.index("-maj") + 1]) + if "-min" in argv or "-maj" in argv: + SpeedOverride = True + else: print(f"Spyglass {VERSION}: Generate NationStates region update timesheets.") UAgent = input("Nation Name: ") @@ -444,4 +454,4 @@ def download_dump() -> None: write_log(f"INFO Successfully saved to {filename}") write_log(f"INFO Spyglass run complete. Exiting...") -raise SystemExit(0) +raise SystemExit(0) \ No newline at end of file