add help option (#171)

This commit is contained in:
pdxlocations
2025-04-16 20:49:17 -07:00
committed by GitHub
parent 99839a8075
commit 3959f0768b
+5
View File
@@ -112,6 +112,11 @@ def main(stdscr: curses.window) -> None:
def start() -> None:
"""Launch curses wrapper and redirect logs to file."""
if "--help" in sys.argv or "-h" in sys.argv:
setup_parser().print_help()
sys.exit(0)
with open(config.log_file_path, "a", buffering=1) as log_f:
sys.stdout = log_f
sys.stderr = log_f