TTR CLI tool
TTR CLI is a tool built using TTR library.
This tool can be used to render data from various sources and either print results to screen or save them in output folder.
Supported arguments:
-d, --data OS path to folder with data files or to data file, default ./Data/
-t, --templates OS path to folder, .txt or .xlsx file with template(s), default ./Templates/
-o, --output Output folder location, default ./Output/<current time><data file name>/
-p, --print Print results to terminal instead of saving to folder
-l, --logging Set logging level - "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"; default ERROR
-f, --filters Comma separated list of glob patterns to use for filtering data to render
Note
--templates
argument should be a path to folder with templates
files within that folder/subfolders or path to .xlsx
spreadsheet file with
templates or path to .txt
file with single template content.
In general case TTR CLI utility takes data file and templates location references and saves produced results in a subfolder within ./Output/
directory, where subfolder name has this format ./Output/<current time><data file name>/
.
Sample invocation:
ttr -d ./data/data.yaml
ttr -d ./data/data.yaml -t ./templates_folder/
ttr -d ./data/data.yaml -t ./templates/templates_spreadsheet_file.xlsx
Alternatively a path to directory can be provided instead of data file, in that case TTR will scan that path and prompt user to select file to work with:
ttr -d ./data/
====================
Files found in './data/' directory
0: csv_data_1.csv
1: data.yaml
2: table_data_1.xlsx
Choose data file to work with (number): 1