# HG changeset patch # User Ludovic Chabant # Date 1516120834 28800 # Node ID 1a7f3ae09c5364626f71966512c2af8732dda2df # Parent 96f1e5e377efeed258d7e5f7d8f4025c67af12bd bake: Allow specifying which asset processors to use on a per-source basis. diff -r 96f1e5e377ef -r 1a7f3ae09c53 piecrust/pipelines/asset.py --- a/piecrust/pipelines/asset.py Tue Jan 16 08:39:08 2018 -0800 +++ b/piecrust/pipelines/asset.py Tue Jan 16 08:40:34 2018 -0800 @@ -34,11 +34,12 @@ def initialize(self): # Get the list of processors for this run. processors = self.app.plugin_loader.getProcessors() - enabled_processors = self.app.config.get('pipelines/asset/processors') - if enabled_processors is not None: - logger.debug("Filtering processors to: %s" % enabled_processors) - processors = get_filtered_processors(processors, - enabled_processors) + for flt in [ + self.app.config.get('pipelines/asset/processors'), + self.source.config.get('processors')]: + if flt is not None: + logger.debug("Filtering processors to: %s" % flt) + processors = get_filtered_processors(processors, flt) # Invoke pre-processors. proc_ctx = ProcessorContext(self)