diff piecrust/processing/sitemap.py @ 852:4850f8c21b6e

core: Start of the big refactor for PieCrust 3.0. * Everything is a `ContentSource`, including assets directories. * Most content sources are subclasses of the base file-system source. * A source is processed by a "pipeline", and there are 2 built-in pipelines, one for assets and one for pages. The asset pipeline is vaguely functional, but the page pipeline is completely broken right now. * Rewrite the baking process as just running appropriate pipelines on each content item. This should allow for better parallelization.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 17 May 2017 00:11:48 -0700
parents 62274d805a6e
children f070a4fc033c
line wrap: on
line diff
--- a/piecrust/processing/sitemap.py	Sat Apr 29 21:42:22 2017 -0700
+++ b/piecrust/processing/sitemap.py	Wed May 17 00:11:48 2017 -0700
@@ -3,16 +3,15 @@
 import yaml
 from piecrust.data.iterators import PageIterator
 from piecrust.processing.base import SimpleFileProcessor
-from piecrust.routing import create_route_metadata
 
 
 logger = logging.getLogger(__name__)
 
 
 SITEMAP_HEADER = \
-"""<?xml version="1.0" encoding="utf-8"?>
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-"""
+    """<?xml version="1.0" encoding="utf-8"?>
+    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+    """
 SITEMAP_FOOTER = "</urlset>\n"
 
 SITEURL_HEADER =     "  <url>\n"
@@ -30,7 +29,7 @@
         super(SitemapProcessor, self).__init__({'sitemap': 'xml'})
         self._start_time = None
 
-    def onPipelineStart(self, pipeline):
+    def onPipelineStart(self, ctx):
         self._start_time = time.time()
 
     def _doProcess(self, in_path, out_path):