comparison piecrust/processing/sitemap.py @ 979:45ad976712ec

tests: Big push to get the tests to pass again. - Lots of fixes everywhere in the code. - Try to handle debug logging in the multiprocessing worker pool when running in pytest. Not perfect, but usable for now. - Replace all `.md` test files with `.html` since now a auto-format extension always sets the format. - Replace `out` with `outfiles` in most places since now blog archives are added to the bake output and I don't want to add expected outputs for blog archives everywhere.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 29 Oct 2017 22:51:57 -0700
parents 08e02c2a2a1a
children 727110ea112a
comparison
equal deleted inserted replaced
978:7e51d14097cb 979:45ad976712ec
9 9
10 logger = logging.getLogger(__name__) 10 logger = logging.getLogger(__name__)
11 11
12 12
13 SITEMAP_HEADER = \ 13 SITEMAP_HEADER = \
14 """<?xml version="1.0" encoding="utf-8"?> 14 """<?xml version="1.0" encoding="utf-8"?>
15 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 15 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
16 """ 16 """
17 SITEMAP_FOOTER = "</urlset>\n" 17 SITEMAP_FOOTER = "</urlset>\n"
18 18
19 SITEURL_HEADER = " <url>\n" 19 SITEURL_HEADER = " <url>\n" # NOQA: E222
20 SITEURL_LOC = " <loc>%s</loc>\n" 20 SITEURL_LOC = " <loc>%s</loc>\n" # NOQA: E222
21 SITEURL_LASTMOD = " <lastmod>%s</lastmod>\n" 21 SITEURL_LASTMOD = " <lastmod>%s</lastmod>\n" # NOQA: E222
22 SITEURL_CHANGEFREQ = " <changefreq>%s</changefreq>\n" 22 SITEURL_CHANGEFREQ = " <changefreq>%s</changefreq>\n" # NOQA: E222
23 SITEURL_PRIORITY = " <priority>%0.1f</priority>\n" 23 SITEURL_PRIORITY = " <priority>%0.1f</priority>\n" # NOQA: E222
24 SITEURL_FOOTER = " </url>\n" 24 SITEURL_FOOTER = " </url>\n" # NOQA: E222
25 25
26 26
27 class SitemapProcessor(SimpleFileProcessor): 27 class SitemapProcessor(SimpleFileProcessor):
28 PROCESSOR_NAME = 'sitemap' 28 PROCESSOR_NAME = 'sitemap'
29 29