From 1c366183fc1dd880363956cc17a6d6159cecbd05 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 17 Jan 2021 16:37:27 +0000 Subject: added flag to change input directory for import templates command --- datamaps/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'datamaps/main.py') 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( -- cgit v1.2.3