Skip to content

Commit baa38ca

Browse files
committed
[#34] flatten function argument root_list_path default to main
1 parent 9635bf1 commit baa38ca

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

flattentool/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def spreadsheet_output(spreadsheet_output_class, name):
3838
raise Exception('The requested format is not available')
3939

4040

41-
def flatten(input_name, schema=None, output_name='releases', output_format='all', main_sheet_name='main', root_list_path='releases', rollup=False, root_id='ocid', use_titles=False, **_):
41+
def flatten(input_name, schema=None, output_name='releases', output_format='all', main_sheet_name='main', root_list_path='main', rollup=False, root_id='ocid', use_titles=False, **_):
4242
"""
4343
Flatten a nested structure (JSON) to a flat structure (spreadsheet - csv or xlsx).
4444

flattentool/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def create_parser():
7676
help="Name of the outputted file. Will have an extension appended if format is all.")
7777
parser_flatten.add_argument(
7878
"--root-list-path",
79-
help="Path of the root list, defaults to releases")
79+
help="Path of the root list, defaults to main")
8080
parser_flatten.add_argument(
8181
"--rollup",
8282
action='store_true',
@@ -103,8 +103,8 @@ def create_parser():
103103
"-b", "--base-json",
104104
help="A base json file to populate the releases key in.")
105105
parser_unflatten.add_argument(
106-
"-m", "--main-sheet-name",
107-
help="The name of the main sheet. Defaults to releases")
106+
"-m", "--root-list-path",
107+
help="The path in the JSON that will contain the unflattened list. Defaults to main.")
108108
parser_unflatten.add_argument(
109109
"-e", "--encoding",
110110
help="Encoding of the input file(s) (only relevant for CSV). Defaults to utf8.")

0 commit comments

Comments
 (0)