only get current year by default

This commit is contained in:
Jan Bader
2026-04-12 20:59:06 +02:00
parent 0ad9567cdc
commit 395998de88
2 changed files with 11 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import argparse
import logging
import os
import sys
from config import Config
@@ -16,6 +17,7 @@ def main():
parser.add_argument("--document-type", help="Document type to select")
parser.add_argument("--company", help="Company name to fill")
parser.add_argument("--notes", help="Notes to fill on invoices")
parser.add_argument("--all-years", action="store_true", help="Download invoices for all years")
parser.add_argument("--verbose", "-v", action="store_true", help="Verbose logging")
args = parser.parse_args()
@@ -39,6 +41,8 @@ def main():
Config.INVOICE_COMPANY = args.company
if args.notes:
Config.INVOICE_NOTES = args.notes
if args.all_years:
os.environ["DOWNLOAD_ALL_YEARS"] = "true"
try:
Config.validate()