From 7851b0e7684d23d5835292a4e407495c4c4e0e94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philip=20R=C3=B6ggla?= <philip.roeggla@onb.ac.at>
Date: Mon, 7 Sep 2020 09:25:15 +0200
Subject: [PATCH] option instead of argument - help available

---
 travelogues_extraction/script/script.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/travelogues_extraction/script/script.py b/travelogues_extraction/script/script.py
index f0111c0..9d2d633 100644
--- a/travelogues_extraction/script/script.py
+++ b/travelogues_extraction/script/script.py
@@ -12,15 +12,15 @@ from travelogues_extraction.controller.main import FromAlmaOutputToExcel
 
 
 @click.command()
-@click.argument('--input-file', help='Use .xlsx file as input', type=click.File)
-@click.argument('--ac-column', type=click.STRING, help=
+@click.option('--input-file', help='Use .xlsx file as input', type=click.File)
+@click.option('--ac-column', type=click.STRING, help=
 'The column of the input file, where the ac numbers are. The column name is the string in the first row of the column',
                 )
-@click.argument('--start', default=0, type=click.INT, help='The first record of the input file to extract the data')
-@click.argument('--stop', default=None, type=click.INT, help='The last record of the input file to extract the data')
-@click.argument('--output-file', help='Generate this .xlsx file', type=click.File)
-@click.argument('--log-file', default=None, help='If given, write a csv log that that file', type=click.File)
-@click.argument('--deep-log-file', default=None, help='If given, write a deep json log that that file', type=click.File)
+@click.option('--start', default=0, type=click.INT, help='The first record of the input file to extract the data')
+@click.option('--stop', default=None, type=click.INT, help='The last record of the input file to extract the data')
+@click.option('--output-file', help='Generate this .xlsx file', type=click.File)
+@click.option('--log-file', default=None, help='If given, write a csv log that that file', type=click.File)
+@click.option('--deep-log-file', default=None, help='If given, write a deep json log that that file', type=click.File)
 def extract_data(input_file: str, output_file: str, ac_column: str, start: typing.Optional[int] = 0, stop: typing.Optional[int]=None, log_file: typing.Optional[str]=None, deep_log_file: typing.Optional[str]=None):
     """
     Takes an excel file with a column of ac numbers, gets data from alma, brings the data in excel like shape, and generates an excel file with this data
-- 
GitLab