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("--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("--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("--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()
|
args = parser.parse_args()
|
||||||
|
|
||||||
print(f"Tanggal : {args.date}")
|
print(f"Tanggal : {args.date}")
|
||||||
@@ -403,10 +404,11 @@ def main():
|
|||||||
return
|
return
|
||||||
|
|
||||||
# 6. Konfirmasi & upload
|
# 6. Konfirmasi & upload
|
||||||
confirm = input(f"\nUpload {len(entries)} timesheet entry? (y/N): ").strip().lower()
|
if not args.yes:
|
||||||
if confirm != "y":
|
confirm = input(f"\nUpload {len(entries)} timesheet entry? (y/N): ").strip().lower()
|
||||||
print("Dibatalkan.")
|
if confirm != "y":
|
||||||
return
|
print("Dibatalkan.")
|
||||||
|
return
|
||||||
|
|
||||||
print()
|
print()
|
||||||
ok, fail = 0, 0
|
ok, fail = 0, 0
|
||||||
|
|||||||
Reference in New Issue
Block a user