From 7c42d4c1949516fdadb5db0634436b1451adf56d Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 17 Sep 2020 11:52:31 +0200 Subject: Make id mandatory --- fracture/__main__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fracture/__main__.py b/fracture/__main__.py index e7700f3..90f2dd3 100644 --- a/fracture/__main__.py +++ b/fracture/__main__.py @@ -139,7 +139,6 @@ def summarize(xlsx=False, year=None, quarter=None): @command def render(id, template=None, type=None, list_templates=None): - if list_templates: # List the template directory and exit print("Current templatedir:", TEMPLATE_DIR) @@ -199,7 +198,7 @@ if __name__ == "__main__": # Render invoice summary_parser = subparsers.add_parser("render", aliases=["rend", "r"], help="Render chosen invoice in the format defined by a template") - summary_parser.add_argument("id", nargs="?", type=str, + summary_parser.add_argument("id", type=str, help="Invoice identification string") summary_parser.add_argument("--type", type=str, help="Invoice type", default="sent") @@ -214,7 +213,7 @@ if __name__ == "__main__": # jsonify json_parser = subparsers.add_parser("json", aliases=["j"], help="Dump chosen invoice in json format") - json_parser.add_argument("id", nargs="?", type=str, + json_parser.add_argument("id", type=str, help="Invoice identification string") json_parser.add_argument("--type", type=str, help="Invoice type", default="sent") -- cgit v1.2.3