diff --git a/update_pages.py b/update_pages.py index bc0cc75..e643abf 100755 --- a/update_pages.py +++ b/update_pages.py @@ -18,8 +18,9 @@ from optparse import OptionParser parser = OptionParser () -parser.set_defaults (cutoff=30) +parser.set_defaults (cutoff=30, all=False) parser.add_option ("-c", "--cutoff", dest="cutoff", help="only process files newer than N minutes", metavar="MINUTES", type=int) +parser.add_option ("-a", "--all", action="store_true", dest="all", help="process all files", metavar="") (options, args) = parser.parse_args () # assume that SVN is updated less than 30 minutes prior to now @@ -36,7 +37,7 @@ # only files changed within last minutes st = os.stat (os.path.join (root, filename)) mtime = datetime.fromtimestamp (st.st_mtime) - if mtime < cutoff: + if mtime < cutoff and not options.all: continue # convert filename to wiki page style