Last modified: 2014-09-09 02:23:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70503, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68503 - replacementfile for replace.py
replacementfile for replace.py
Status: NEW
Product: Pywikibot
Classification: Unclassified
Other scripts (Other open bugs)
core-(2.0)
All All
: Normal enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks: 55880
  Show dependency treegraph
 
Reported: 2014-07-24 11:42 UTC by JAn Dudík
Modified: 2014-09-09 02:23 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description JAn Dudík 2014-07-24 11:42:49 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)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links