continue refactoring
This commit is contained in:
+3
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user