constance

Scripts for generating (an earlier obsolete version of) my personal web site
git clone https://code.djc.id.au/git/constance/
commit 078b8decc4b19d55a723cf5553ba11a9434766dc
parent bc15276e438a40cfe3b3e6491a4bea15613d531e
Author: Sam Kingston <sam@sjkwi.com.au>
Date:   Sun, 10 Oct 2010 17:28:48 +1000

made readinglog optional

Diffstat:
Mconstance.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/constance.py b/constance.py
@@ -36,7 +36,7 @@ def main():
     parser.add_option('--root-dir', metavar='DIR')
     parser.add_option('--xslt', metavar='FILENAME')
     parser.set_defaults(blog_dir='./blog/',
-            reading_log='./reading_log.yaml',
+            reading_log=None,
             tags_dir='./tags/',
             root_dir='./',
             xslt='./style.xsl')
@@ -44,7 +44,10 @@ def main():
 
     xslt = lxml.etree.XSLT(lxml.etree.parse(options.xslt))
     blog_entries = blog.generate(options.blog_dir, xslt)
-    reading_entries = reading.generate(options.reading_log, xslt)
+    if options.reading_log is not None:
+        reading_entries = reading.generate(options.reading_log, xslt)
+    else:
+        reading_entries = []
     tags.generate(options.tags_dir, xslt, blog_entries)
     for filename in os.listdir(options.root_dir):
         if filename.endswith('.html.in'):