def main(argv): inputfile = "" outputfile = "" try: opts, args = getopt.getopt(argv, "u:f:") except getopt.GetoptError as e: print "GetoptError: %s" % (e) sys.exit(2) if len(opts) == 0: print "Please include either a url of a mailman web archive" print "or the path to a file with a linebreak-separated list" print "of such urls." print "" print "For example:" print "" print "python bin/collect_mail.py -u http://mail.scipy.org/pipermail/scipy-dev/" print "" print "or" print "" print "python bin/collect_mail.py -f examples/urls.txt" print "" for opt, arg in opts: if opt == "-u": mailman.collect_from_url(arg) sys.exit() elif opt == "-f": mailman.collect_from_file(arg)
def main(argv): inputfile = '' outputfile = '' try: opts, args = getopt.getopt(argv,"u:f:") except getopt.GetoptError as e: print 'GetoptError: %s' % (e) sys.exit(2) if len(opts) == 0: print 'Please include either a url of a mailman web archive' print 'or the path to a file with a linebreak-separated list' print 'of such urls.' print '' print 'For example:' print '' print 'python bin/collect_mail.py -u http://mail.scipy.org/pipermail/scipy-dev/' print '' print 'or' print '' print 'python bin/collect_mail.py -f examples/urls.txt' print '' for opt, arg in opts: if opt == '-u': mailman.collect_from_url(arg) sys.exit() elif opt == '-f': mailman.collect_from_file(arg)
def main(argv): inputfile = '' outputfile = '' try: opts, args = getopt.getopt(argv, "u:f:") except getopt.GetoptError as e: print 'GetoptError: %s' % (e) sys.exit(2) if len(opts) == 0: print 'Please include either a url of a mailman web archive' print 'or the path to a file with a linebreak-separated list' print 'of such urls.' print '' print 'For example:' print '' print 'python bin/collect_mail.py -u http://mail.scipy.org/pipermail/scipy-dev/' print '' print 'or' print '' print 'python bin/collect_mail.py -f examples/urls.txt' print '' for opt, arg in opts: if opt == '-u': mailman.collect_from_url(arg) sys.exit() elif opt == '-f': mailman.collect_from_file(arg)
def main(args): if args.u: if args.archives: mailman.collect_from_url(args.u, archive_dir=args.archives) else: mailman.collect_from_url(args.u) sys.exit() elif args.f: if args.archives: mailman.collect_from_file(args.f, archive_dir=args.archives) else: mailman.collect_from_file(args.f)
def main(args): notes = None if args.notes: notes = args.notes if args.u: if args.archives: mailman.collect_from_url(args.u, archive_dir=args.archives, notes=notes) else: mailman.collect_from_url(args.u, notes=notes) sys.exit() elif args.f: if args.archives: mailman.collect_from_file(args.f, archive_dir=args.archives, notes=notes) else: mailman.collect_from_file(args.f, notes=notes)
def main(args): if args.u: mailman.collect_from_url(args.u) sys.exit() elif args.f: mailman.collect_from_file(args.f)