changeset 46:966fef436653

added --authors-file option
author Atul Varma <varmaa@toolness.com>
date Sun, 28 Mar 2010 23:05:59 +0000
parents 8cb5e556960b
children d79bf2ee77f5
files publish_edition.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/publish_edition.py	Sun Mar 28 22:37:49 2010 +0000
+++ b/publish_edition.py	Sun Mar 28 23:05:59 2010 +0000
@@ -158,6 +158,7 @@
 def publish_edition(update_whoisi=False,
                     update_urls=False,
                     update_articles=False,
+                    authors_filename=AUTHORS_FILENAME,
                     dry_run=False):
     if update_whoisi:
         update_urls = True
@@ -165,7 +166,7 @@
         update_articles = True
 
     names = [line.strip()
-             for line in open(AUTHORS_FILENAME, 'r').readlines()
+             for line in open(authors_filename, 'r').readlines()
              if line and not line.startswith('#')]
 
     people = load(WHOISI_FILENAME, [])
@@ -267,6 +268,11 @@
          help='do not write anything to disk',
          action='store_true',
          default=False),
+
+    ('-a', '--authors-file',):
+    dict(dest='authors_filename',
+         help='authors filename (default is %s)' % repr(AUTHORS_FILENAME),
+         default=AUTHORS_FILENAME)
 }
 
 if __name__ == '__main__':