feat: tambah flag --yes untuk skip konfirmasi upload
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user