aboutsummaryrefslogtreecommitdiffstats
path: root/datamaps/main.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2021-01-17 16:37:27 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2021-01-17 16:37:27 +0000
commit1c366183fc1dd880363956cc17a6d6159cecbd05 (patch)
treed2b945df2516d0ea9d6840102d53ef6110c47508 /datamaps/main.py
parent82c8be2d89a1359c271bccc889986272fcb40d02 (diff)
added flag to change input directory for import templates command
Diffstat (limited to 'datamaps/main.py')
-rw-r--r--datamaps/main.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/datamaps/main.py b/datamaps/main.py
index 7b7c670..1bde2a6 100644
--- a/datamaps/main.py
+++ b/datamaps/main.py
@@ -143,7 +143,8 @@ def show_file():
help="Set row limit to prevent spurious Excel files with hidden rows being processed."
"Default is 500.",
)
-def templates(to_master, datamap, rowlimit):
+@click.option("--inputdir", help="Path to input directory", metavar="INPUT_DIRECTORY_PATH")
+def templates(to_master, datamap, rowlimit, inputdir):
"""Import data to a master file from a collection of populated templates.
BASICS
@@ -171,7 +172,7 @@ def templates(to_master, datamap, rowlimit):
if to_master:
try:
engine_cli.import_and_create_master(
- echo_funcs=output_funcs, datamap=datamap, rowlimit=rowlimit
+ echo_funcs=output_funcs, datamap=datamap, rowlimit=rowlimit, inputdir=inputdir
)
except MalFormedCSVHeaderException as e:
click.echo(