lists.arthurdejong.org
RSS feed

webcheck commit: r461 - webcheck

[Date Prev][Date Next] [Thread Prev][Thread Next]

webcheck commit: r461 - webcheck



Author: devin
Date: Wed Nov 16 12:16:45 2011
New Revision: 461
URL: http://arthurdejong.org/viewvc/webcheck?revision=461&view=revision

Log:
support --level cmdline option

Modified:
   webcheck/cmd.py

Modified: webcheck/cmd.py
==============================================================================
--- webcheck/cmd.py     Tue Nov  8 22:58:48 2011        (r460)
+++ webcheck/cmd.py     Wed Nov 16 12:16:45 2011        (r461)
@@ -94,6 +94,7 @@
       '  -f, --force            overwrite files without asking\n'
       '  -r, --redirects=N      the number of redirects webcheck should 
follow,\n'
       '                         0 implies to follow all redirects 
(default=%(redirects)d)\n'
+      '  -l, --levels=N         maximum depth of links to follow from base 
urls (default=inf)\n'
       '  -w, --wait=SECONDS     wait SECONDS between retrievals\n'
       '  -V, --version          output version information and exit\n'
       '  -h, --help             display this help and exit\n'
@@ -111,7 +112,7 @@
           ('internal=', 'external=', 'yank=', 'base-only', 'avoid-external',
            'ignore-robots',
            'quiet', 'silent', 'debug', 'profile', 'output=', 'continue',
-           'force', 'redirects=', 'wait=', 'version', 'help'))
+           'force', 'redirects=', 'levels=', 'wait=', 'version', 'help'))
         internal_urls = []
         external_urls = []
         yank_urls = []
@@ -143,6 +144,8 @@
                 config.OVERWRITE_FILES = True
             elif flag in ('-r', '--redirects'):
                 config.REDIRECT_DEPTH = int(arg)
+            elif flag in ('-l', '--levels'):
+                config.MAX_DEPTH = int(arg)
             elif flag in ('-w', '--wait'):
                 config.WAIT_BETWEEN_REQUESTS = float(arg)
             elif flag in ('-V', '--version'):
-- 
To unsubscribe send an email to
webcheck-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/webcheck-commits/