]> git.donarmstrong.com Git - neurodebian.git/commitdiff
Let feeds go into a dedicated directory.
authorMichael Hanke <michael.hanke@gmail.com>
Sat, 19 Mar 2011 19:34:02 +0000 (15:34 -0400)
committerMichael Hanke <michael.hanke@gmail.com>
Sat, 19 Mar 2011 19:34:02 +0000 (15:34 -0400)
sphinx/conf.py
sphinx/sphinxext/feed/__init__.py

index 41a69183ded3e2374ba71f22053312a5c6abac14..226e940252d9e4de236cc6229f7d5a10224b3de7 100644 (file)
@@ -217,9 +217,9 @@ feed_base_url = 'http://neuro.debian.net'
 feed_title = "NeuroDebian Insider"
 feed_subtitle = "This solves all your problems"
 feed_description = "A blog about using the ultimate operating system in neuroscience research"
-feed_variants = {'planetdebian': {'filename': 'debian-planet.xml',
+feed_variants = {'planetdebian': {'filename': 'feeds/for-debian-planet.xml',
                                   'tag': 'debian'},
-                 'all': {'filename': 'all.xml', 'tag': None}}
+                 'all': {'filename': 'feeds/blog.xml', 'tag': None}}
 feed_categories = ['debian', 'neuroscience']
 feed_author_name = 'NeuroDebian team'
 feed_author_email = 'team@neuro.debian.net'
index 0bed26e8c5249ab0a39c08ef6ca3b355de6b1982..13706a14f34dd4ba104fdc6cfc29233ff09ac341 100644 (file)
@@ -144,6 +144,10 @@ def emit_feed(app, exc):
                 feed.add_item(**feed_entries[key])
         outfilename = os.path.join(app.builder.outdir,
           feedvar_settings['filename'])
+        # make sure the directory exists
+        feed_dir = os.path.dirname(outfilename)
+        if feed_dir and not os.path.exists(feed_dir):
+            os.makedirs(os.path.dirname(outfilename))
         fp = open(outfilename, 'w')
         feed.write(fp, 'utf-8')
         fp.close()