Beispiel #1
0
 def __FindProcessors(self, contentProcessors: List[BasicContentProcessor],
                      contentFile: str) -> List[BasicContentProcessor]:
     extension = IOUtil.GetFileNameExtension(contentFile)[1:].lower()
     return [
         contentProcessor for contentProcessor in contentProcessors
         if extension in contentProcessor.FileExtensionSet
     ]
Beispiel #2
0
 def GetOutputFileName(self,
                       config: Config,
                       contentOutputPath: str,
                       contentFileRecord: PathRecord,
                       removeExtension: bool = False) -> str:
     relativePathToContentFile = contentFileRecord.RelativePath
     if removeExtension:
         extension = IOUtil.GetFileNameExtension(relativePathToContentFile)
         relativePathToContentFile = relativePathToContentFile[:-len(
             extension)]
     return IOUtil.Join(contentOutputPath, relativePathToContentFile)