Parse command line arguments.
()
| 362 | logger.debug(f"{msg.action}") |
| 363 | |
| 364 | def parse_args(): |
| 365 | """Parse command line arguments.""" |
| 366 | parser = argparse.ArgumentParser(description='UniFi Camera Security Monitor') |
| 367 | parser.add_argument('--test', action='store_true', |
| 368 | help='Enable test mode to analyze all images') |
| 369 | parser.add_argument('--quiet', action='store_true', |
| 370 | help='Disable console output (logs will still be written to file)') |
| 371 | parser.add_argument('--notify', action='store_true', |
| 372 | help='Enable Pushover notifications for alarms') |
| 373 | parser.add_argument('--testalarm', action='store_true', |
| 374 | help='Send a test alarm notification and exit') |
| 375 | parser.add_argument('--scheduled-exit', action='store_true', |
| 376 | help='Exit daily at 8pm to allow container restart') |
| 377 | return parser.parse_args() |
| 378 | |
| 379 | # --- Main function ------------------------------------------------------------ |
| 380 |