Commit bb68daab authored by Bruno Duyé's avatar Bruno Duyé

Minor: add help for --datasets option + code comments

parent 10e4ce36
......@@ -322,7 +322,7 @@ def main():
help='path of source directory containing Eurostat series in source format')
parser.add_argument('target_dir', type=Path, help='path of target directory containing datasets & '
'series in DBnomics JSON and TSV formats')
parser.add_argument('--datasets', nargs='+', metavar='DATASET_CODE', help='convert only the given datasets')
parser.add_argument('--datasets', nargs='+', metavar='DATASET_CODE', help='convert only the given datasets (datasets codes, space separated)')
parser.add_argument('--full', action='store_true',
help='convert all datasets; default behavior is to convert what changed since last commit')
parser.add_argument('--log', default='INFO', help='level of logging messages')
......@@ -374,6 +374,7 @@ def main():
toc_dataset_json_stub_by_code = {}
category_tree_json = toc_to_category_tree(toc_element, toc_dataset_json_stub_by_code)
# Build list of datasets codes to convert
datasets_codes_to_convert = set()
for dataset_code in sorted(toc_dataset_json_stub_by_code):
if args.datasets and dataset_code not in args.datasets:
......
......@@ -87,7 +87,7 @@ def main():
help='download all datasets; default behavior is to download what changed since last commit')
parser.add_argument('--log', default='INFO', help='level of logging messages')
parser.add_argument('--resume', action='store_true', help='keep existing files in target directory')
parser.add_argument('--datasets', nargs='+', metavar='DATASET_CODE', help='convert only the given datasets')
parser.add_argument('--datasets', nargs='+', metavar='DATASET_CODE', help='convert only the given datasets (datasets codes, space separated)')
args = parser.parse_args()
if not args.target_dir.is_dir():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment