only get current year by default
This commit is contained in:
4
main.py
4
main.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user