Esempio n. 1
0
 def _create_opt_parser(self):
     option_parser = LockssScript._create_opt_parser(self)
     option_parser.add_option('-a', '--action',
                     action='append',
                     type='choice', 
                     choices=Action.values,
                     help='which action to take on arhival units, available ' + str(Action.values))
     option_parser.add_option('--ncrawllimit',
                     type='int',
                     help='limiting the number of printed crawl status per archival units in printcrawlstatus [%default]')
     
     option_parser.add_option('-x', '--expire',
                             type='int',
                             help='number of hours after which to expire data from LOCKSS caches  [%default]')
     
     option_parser.add_option('--noquit', 
                     action='store_true',
                     help = "repeat status datat requests for failed auids until all succeed" )
     option_parser.add_option('-o', '--outputdir',
                     dest= 'dir', 
                     help="Directory for output files [defaults to server's domain name]")
     
     option_parser.add_option('--crawlsort',
                     type='choice',
                     choices=LockssCrawlStatus.SORTFIELDS,
                     help='sort field for ' + Action.PRTCRAWLSTATUS + ' action [%default]; available ' +  
                     ",".join(sorted(LockssCrawlStatus.SORTFIELDS)))
     option_parser.add_option('--crawlheaders',
                     help='headers for ' + Action.PRTCRAWLSTATUS + ' [%default]; available headers: ' +  
                     ",".join(sorted(LockssCrawlStatus.PRTFIELDS)) )
     
     option_parser.add_option('--ausummarysort',
                     type='choice',
                     choices=LockssCacheAuSummary.SORTFIELDS,
                     help='sort field for ' + Action.PRTAUSUMMARY + ' action [%default]; available ' +  
                     ",".join(sorted(LockssCacheAuSummary.SORTFIELDS)))
     option_parser.add_option('--ausummaryheaders',
                     help='headers for ' + Action.PRTAUSUMMARY + ' [%default]; available headers: ' +  
                     ",".join(sorted(LockssCacheAuSummary.PRTFIELDS)) )
     
     option_parser.add_option('--urlsort',
                     type='choice',
                     choices=UrlReport.SORTFIELDS,
                     help='sort field for '  + Action.PRTURLLIST + ' action [%default]; available ' +  
                     ",".join(sorted(UrlReport.SORTFIELDS)))
     option_parser.add_option('--urlheaders',
                     help='headers for ' + Action.PRTURLLIST + ' [%default]; available headers: ' +  
                                      ",".join(sorted(UrlReport.PRTFIELDS)) )
     option_parser.add_option('--urlminversion',
                     help='include only urls with a version at least minversion when doing' + Action.PRTURLLIST + ' [%default] ' )
     return option_parser
Esempio n. 2
0
    def _create_opt_parser(self):
        option_parser = LockssScript._create_opt_parser(self)

        option_parser.add_option('--pause',
                        type='int',
                        help="pause time in seconds between retrying active crawls [%default]")
        
        option_parser.add_option('-o', '--outputdir',
                        dest= 'dir', 
                        help='output directory [%default]')
        
        option_parser.add_option('--crawlsort',
                        type='choice',
                        choices=LockssCrawlStatus.SORTFIELDS,
                        help='sort field for ' + Action.PRTCRAWLSTATUS + ' action [%default]; available ' +  str(LockssCrawlStatus.SORTFIELDS))
        option_parser.add_option('--crawlheaders',
                        help='headers for ' + Action.PRTCRAWLSTATUS + ' [%default]; available headers ' +  
                        str(LockssCrawlStatus.PRTFIELDS) )
        
        return option_parser