Add name_and_ext shortcut

This commit is contained in:
mvdbeek
2021-05-27 17:21:01 +02:00
parent 97af023140
commit f24024c0d7
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -305,6 +305,10 @@ class DatasetFilenameWrapper(ToolParameterValueWrapper):
def file_ext(self):
return getattr(self.unsanitized.datatype, 'file_ext_export_alias', None) or self.dataset.extension
@property
def name_and_ext(self):
return f"{self.element_identifier}.{self.file_ext}"
@property
def is_collection(self):
return False
+2 -2
View File
@@ -10,8 +10,8 @@
'$filepath'
#end for
--names
#for $name in $export_type.infiles:
'${name.element_identifier}.${name.file_ext}'
#for $infile in $export_type.infiles:
'$infile.name_and_ext'
#end for
#else
--infiles