Skip to content

Commit 094c045

Browse files
committed
[#34] Remove OCDS specific defaults for filenames
1 parent baa38ca commit 094c045

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

flattentool/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from collections import OrderedDict
1010

1111

12-
def create_template(schema, output_name='releases', output_format='all', main_sheet_name='main', flatten=False, rollup=False, root_id='ocid', use_titles=False, **_):
12+
def create_template(schema, output_name='template', output_format='all', main_sheet_name='main', flatten=False, rollup=False, root_id='ocid', use_titles=False, **_):
1313
"""
1414
Creates template file(s) from given inputs
1515
This function is built to deal with commandline input and arguments
@@ -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='main', rollup=False, root_id='ocid', use_titles=False, **_):
41+
def flatten(input_name, schema=None, output_name='flattened', 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
@@ -100,7 +100,7 @@ def decimal_default(o):
100100
raise TypeError(repr(o) + " is not JSON serializable")
101101

102102

103-
def unflatten(input_name, base_json=None, input_format=None, output_name='releases.json',
103+
def unflatten(input_name, base_json=None, input_format=None, output_name='unflattened.json',
104104
root_list_path='main', encoding='utf8', timezone_name='UTC',
105105
root_id='ocid', schema='', convert_titles=False, cell_source_map=None,
106106
heading_source_map=None, **_):

flattentool/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def create_parser():
101101
required=True)
102102
parser_unflatten.add_argument(
103103
"-b", "--base-json",
104-
help="A base json file to populate the releases key in.")
104+
help="A base json file to populate with the unflattened data.")
105105
parser_unflatten.add_argument(
106106
"-m", "--root-list-path",
107107
help="The path in the JSON that will contain the unflattened list. Defaults to main.")
@@ -110,7 +110,7 @@ def create_parser():
110110
help="Encoding of the input file(s) (only relevant for CSV). Defaults to utf8.")
111111
parser_unflatten.add_argument(
112112
"-o", "--output-name",
113-
help="Name of the outputted file. Will have an extension appended as appropriate. Defaults to releases")
113+
help="Name of the outputted file. Will have an extension appended as appropriate. Defaults to unflattened.json")
114114
parser_unflatten.add_argument(
115115
"-c", "--cell-source-map",
116116
help="Path to write a cell source map to. Will have an extension appended as appropriate.")

0 commit comments

Comments
 (0)