faassen committed 877e7fb

Create commandline blaag script.

Fix NoSectionError.

Comments (0)

Files changed (3)

 from docutils.core import publish_parts
 from hgapi import hgapi
 import PyRSS2Gen
-from ConfigParser import SafeConfigParser
+from ConfigParser import SafeConfigParser, NoSectionError
 import codecs
 def get_configuration(path):
     entries_path = config.get('content', 'entries_path')
     entries = get_entries(entries_path)
+    try:
+        use_filename_for_creation_time = config.getboolean(
+            'datetime',
+            'use_filename_for_creation_time')
+    except NoSectionError:
+        use_filename_for_creation_time = False
     data = get_data_entries(
         entries, entries_path,
-        config.getboolean('datetime', 'use_filename_for_creation_time'))
+        use_filename_for_creation_time)
     main = []
     base_url = config.get('html', 'base_url')
     """Run before commit"""
-if __name__ == "__main__":
+def blaag_script():
         config_path = sys.argv[1]
     except IndexError:
+if __name__ == "__main__":
+    blaag_script()
 develop = .
-parts = devpython pyflakes
+parts = devpython blaag pyflakes
 versions = versions
 unzip = true
 recipe = z3c.recipe.scripts:interpreter
 eggs = blaag
+recipe = z3c.recipe.scripts
+eggs = blaag
 recipe = z3c.recipe.scripts
 eggs = setuptools 
     entry_points = {
+        'console_scripts': [
+            'blaag = blaag:blaag_script',
+            ]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.