def __getSingleFileTemplates(args, job, templateParameters, blackList, whiteList): if args.singleFileTemplates is not None: for templateFile in args.singleFileTemplates: task = config.Task() task.name = templateFile task.singleFileTask = config.SingleFileTask() (task.singleFileTask.template, task.singleFileTask.destFile ) = _splitTemplateAndDestination(templateFile) task.singleFileTask.templateParams = templateParameters task.blackListed = blackList task.whiteListed = whiteList job.tasks.append(task)
def __getMultiFileTemplates(args, job, templateParameters, blackList, whiteList): if args.multiFileTemplates is not None: for templateFile in args.multiFileTemplates: task = config.Task() task.name = templateFile task.multiFileTask = config.MultiFileTask() (task.multiFileTask.template, task.multiFileTask.destDir ) = _splitTemplateAndDestination(templateFile) task.multiFileTask.templateParams = templateParameters task.multiFileTask.destFilePrefix = __extractFromTemplateParameters( 'destFilePrefix', templateParameters) task.multiFileTask.destFilePostfix = __extractFromTemplateParameters( 'destFilePostfix', templateParameters) task.multiFileTask.destFileExt = __extractFromTemplateParameters( 'destFileExt', templateParameters) task.blackListed = blackList task.whiteListed = whiteList job.tasks.append(task)