Commit ea1e2257 authored by Guillaume's avatar Guillaume
Browse files

Fix catalog ext.

parent 4154ebc7
......@@ -36,7 +36,7 @@ def make_json(catdir, project, header):
print(f'Writing JSON catalog...')
# Get catalog name.
catpath = os.path.join(catdir, f'{project}{JSON_EXTENSION}{COMPRESS_EXTENSION}')
catpath = os.path.join(catdir, f'{project}{JSON_EXTENSION}')
# Load Jinja2 template for ESM catalogs.
with open('ESMCollectionTemplate.json') as file:
......@@ -45,9 +45,9 @@ def make_json(catdir, project, header):
# Set template content.
content = dict()
content['esmcat_version'] = '0.1.0'
content['id'] = os.path.splitext(catpath)[0]
content['id'] = project
content['description'] = CATALOG_DESCRIPTION_TEMPLATE.format(project)
content['catalog_file'] = os.path.splitext(catpath)[0] + CSV_EXTENSION
content['catalog_file'] = os.path.splitext(catpath)[0] + CSV_EXTENSION + COMPRESS_EXTENSION
content['attributes'] = list()
for facet in header[2:]:
attr = dict()
......
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