From a6ae3c7207ce8b35cea734734a28d2ff11e7d859 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 6 Aug 2020 00:31:31 +0200 Subject: Set default date to today --- fracture/__main__.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fracture') diff --git a/fracture/__main__.py b/fracture/__main__.py index 822cf96..d0305ab 100644 --- a/fracture/__main__.py +++ b/fracture/__main__.py @@ -1,6 +1,7 @@ from invoice import Invoice, Tax import db +import datetime from functools import wraps from argparse import ArgumentParser as ap import tempfile @@ -140,6 +141,7 @@ if __name__ == "__main__": summary_parser.add_argument("--quarter", type=int, help="Obtain the summary of the quarter") summary_parser.add_argument("--year", type=int, + default=datetime.datetime.now().year, help="Obtain the summary of the year") summary_parser.set_defaults(func=summarize) -- cgit v1.2.3