Permalink
Browse files

added all option

  • Loading branch information...
1 parent 39ddcb1 commit d4671b4bd5bf43483b3b6b1e8f7e89b998914690 Cliff Wells committed May 1, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 update_pages.py
View
@@ -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 <cutoff> 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

0 comments on commit d4671b4

Please sign in to comment.