comparison piecrust/commands/builtin/baking.py @ 711:ab5c6a8ae90a

bake: Replace hard-coded taxonomy support with "generator" system. * Taxonomies are now implemented one or more `TaxonomyGenerator`s. * A `BlogArchivesGenerator` stub is there but non-functional.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 26 May 2016 19:52:47 -0700
parents 066d6156525c
children 78de21447e4e
comparison
equal deleted inserted replaced
710:e85f29b28b84 711:ab5c6a8ae90a
272 logging.info(" - ") 272 logging.info(" - ")
273 273
274 rel_path = os.path.relpath(entry.path, ctx.app.root_dir) 274 rel_path = os.path.relpath(entry.path, ctx.app.root_dir)
275 logging.info(" path: %s" % rel_path) 275 logging.info(" path: %s" % rel_path)
276 logging.info(" source: %s" % entry.source_name) 276 logging.info(" source: %s" % entry.source_name)
277 if entry.taxonomy_info: 277 if entry.extra_key:
278 ti = entry.taxonomy_info 278 logging.info(" extra key: %s" % entry.extra_key)
279 logging.info(" taxonomy: %s = %s (in %s)" %
280 (ti.taxonomy_name, ti.term, ti.source_name))
281 else:
282 logging.info(" taxonomy: <none>")
283 logging.info(" flags: %s" % _join(flags)) 279 logging.info(" flags: %s" % _join(flags))
284 logging.info(" config: %s" % entry.config) 280 logging.info(" config: %s" % entry.config)
285 281
286 if entry.errors: 282 if entry.errors:
287 logging.error(" errors: %s" % entry.errors) 283 logging.error(" errors: %s" % entry.errors)
324 if ri.pagination_has_more: 320 if ri.pagination_has_more:
325 pgn_info += ', has more' 321 pgn_info += ', has more'
326 logging.info(" used pagination: %s", pgn_info) 322 logging.info(" used pagination: %s", pgn_info)
327 logging.info(" used assets: %s", 323 logging.info(" used assets: %s",
328 'yes' if ri.used_assets else 'no') 324 'yes' if ri.used_assets else 'no')
329 logging.info(" used terms: %s" % 325 logging.info(" other info:")
330 _join( 326 for k, v in ri._custom_info.items():
331 ['%s=%s (%s)' % (tn, t, sn) 327 logging.info(" - %s: %s" % (k, v))
332 for sn, tn, t in
333 ri.used_taxonomy_terms]))
334 328
335 if sub.errors: 329 if sub.errors:
336 logging.error(" errors: %s" % sub.errors) 330 logging.error(" errors: %s" % sub.errors)
337 331
338 def _getProcessingRecord(self, ctx, record_name): 332 def _getProcessingRecord(self, ctx, record_name):