Author: poeml Date: Fri Aug 28 02:41:48 2009 New Revision: 7778 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7778&view=rev Log: mb new: - add commandline options --region-only, --country-only, --as-only, --prefix-only to set the respective flags - add commandline options --operator-name and --operator-url - depreciate the --score option, and rename it to --prio mb list: - fix typo added in r7777 Modified: trunk/mirrordoctor/mirrordoctor.py Modified: trunk/mirrordoctor/mirrordoctor.py URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mirrordoctor/mirrordoctor.py?rev=7778&r1=7777&r2=7778&view=diff ============================================================================== --- trunk/mirrordoctor/mirrordoctor.py (original) +++ trunk/mirrordoctor/mirrordoctor.py Fri Aug 28 02:41:48 2009 _at_@ -94,16 +94,30 @@ print i + _at_cmdln.option('--prefix-only', action='store_true', + help='set the mirror to handle only its network prefix') + _at_cmdln.option('--as-only', action='store_true', + help='set the mirror to handle only its autonomous system') + _at_cmdln.option('--country-only', action='store_true', + help='set the mirror to handle only its country') + _at_cmdln.option('--region-only', action='store_true', + help='set the mirror to handle only its region') _at_cmdln.option('-C', '--comment', metavar='ARG', help='comment string') + _at_cmdln.option('--operator-name', metavar='ARG', + help='name of the organization operating the mirror') + _at_cmdln.option('--operator-url', metavar='ARG', + help='URL of the organization operating the mirror') _at_cmdln.option('-a', '--admin', metavar='ARG', help='admins\'s name') _at_cmdln.option('-e', '--admin-email', metavar='ARG', help='admins\'s email address') _at_cmdln.option('-s', '--score', default=100, metavar='ARG', - help='"power index" of this mirror, defaults to 100') + help='priority of this mirror, defaults to 100 (depreciated. Use --prio)') + _at_cmdln.option('-p', '--prio', default=100, metavar='ARG', + help='priority of this mirror, defaults to 100') _at_cmdln.option('-F', '--ftp', metavar='URL', help='FTP base URL') _at_@ -168,17 +182,17 @@ statusBaseurl = 0, admin = opts.admin or '', adminEmail = opts.admin_email or '', - operatorName = '', - operatorUrl = '', + operatorName = opts.operator_name or '', + operatorUrl = opts.operator_url or '', otherCountries = '', publicNotes = '', comment = opts.comment \ or 'Added - %s' % time.ctime(), scanFpm = 0, - countryOnly = 0, - regionOnly = 0, - asOnly = 0, - prefixOnly = 0) + countryOnly = opts.country_only or 0, + regionOnly = opts.region_only or 0, + asOnly = opts.as_only or 0, + prefixOnly = opts.prefix_only or 0) if self.options.debug: print s _at_@ -186,7 +200,7 @@ _at_cmdln.option('--prefix-only', action='store_true', help='display whether the mirror is configured to handle only its network prefix') _at_cmdln.option('--as-only', action='store_true', - help='display whether the mirror is configured to handle only its autnomous system') + help='display whether the mirror is configured to handle only its autonomous system') _at_cmdln.option('--country-only', action='store_true', help='display whether the mirror is configured to handle only its country') _at_cmdln.option('--region-only', action='store_true', _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Fri Aug 28 2009 - 00:41:51 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT