continue refactoring

This commit is contained in:
“christopheseux”
2022-12-27 23:49:57 +01:00
parent fc405797d9
commit 575bbade7b
13 changed files with 506 additions and 156 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ command, write_catalog)
@command
def bundle_library(source_directory, bundle_directory, asset_description_template, thumbnail_template,
def bundle_library(source_directory, bundle_directory, template_description, thumbnail_template,
template=None, data_file=None):
field_pattern = r'{(\w+)}'
@@ -38,7 +38,7 @@ def bundle_library(source_directory, bundle_directory, asset_description_templat
name = field_data.get('name', f.stem)
thumbnail = (f / thumbnail_template.format(name=name)).resolve()
asset_data = (f / asset_description_template.format(name=name)).resolve()
asset_data = (f / template_description.format(name=name)).resolve()
catalogs = sorted([v for k,v in sorted(field_data.items()) if k.isdigit()])
catalogs = [c.replace('_', ' ').title() for c in catalogs]
@@ -163,7 +163,7 @@ if __name__ == '__main__' :
bundle_library(
source_directory=args.source_directory,
bundle_directory=args.bundle_directory,
asset_description_template=args.asset_description_template,
template_description=args.template_description,
thumbnail_template=args.thumbnail_template,
template=args.template,
data_file=args.data_file)