Last modified: 2014-09-09 02:23:35 UTC
in compat: replace.py -pagesgenerator -replacementfile:replace.txt this does not work for core, the whole code part is missing here: elif arg.startswith('-replacementfile'): if len(arg) == len('-replacementfile'): replacefile = pywikibot.input( u'Please enter the filename to read replacements from:') else: replacefile = arg[len('-replacementfile')+1:] try: commandline_replacements.extend( [x.lstrip(u'\uFEFF').rstrip('\r\n') for x in codecs.open(replacefile, 'r', 'utf-8')]) except IOError: raise pywikibot.Error( '\n%s cannot be opened. Try again :-)' % replacefile)