diff --git a/daily_timesheet.py b/daily_timesheet.py index d37405b..9bb3296 100755 --- a/daily_timesheet.py +++ b/daily_timesheet.py @@ -229,6 +229,7 @@ def main(): parser.add_argument("--date", default=today, help=f"Tanggal YYYY-MM-DD (default: {today})") parser.add_argument("--dry-run", action="store_true", help="Preview saja, tidak upload") parser.add_argument("--save-pending", action="store_true", help="Simpan ke pending.json + notifikasi macOS") + parser.add_argument("--yes", action="store_true", help="Skip konfirmasi, langsung upload") args = parser.parse_args() print(f"Tanggal : {args.date}") @@ -403,10 +404,11 @@ def main(): return # 6. Konfirmasi & upload - confirm = input(f"\nUpload {len(entries)} timesheet entry? (y/N): ").strip().lower() - if confirm != "y": - print("Dibatalkan.") - return + if not args.yes: + confirm = input(f"\nUpload {len(entries)} timesheet entry? (y/N): ").strip().lower() + if confirm != "y": + print("Dibatalkan.") + return print() ok, fail = 0, 0