Commit 2daa7adb authored by Bruno Duyé's avatar Bruno Duyé

Dowload: add --only option

parent 745e035d
......@@ -28,6 +28,7 @@ Usage:
Options:
--debug show debug output, and log each API request in 'last_api_result.json' file
--only <datasets_codes> only convert given dataset(s)_code(s). Ex: "--only ABA,BGG"
-l --limit_nb_series <number> limit the number of series to download per dataset
"""
......@@ -85,6 +86,9 @@ def main():
api_user_id = get_api_user_id_from_env()
for dataset_code in DATASETS_TO_DOWNLOAD:
if args["--only"] and not dataset_code in args["--only"]:
log.info('-> ignoring {!r} (due to --only option)'.format(dataset_code))
continue
dataset_path = os.path.join(target_dir, dataset_code)
os.mkdir(dataset_path)
log.info("** {}".format(dataset_code))
......
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