Page MenuHomePhabricator

replace.py with -titleregex parameter does not work
Closed, InvalidPublic

Description

Example command and response
@PAWS:~$ pwb.py replace -family:wikisource -lang:te  -titleregex:".*"
Please enter the text that should be replaced: a
Please enter the new text: b
Please enter another text that should be replaced,
or press Enter to start:
The summary message for the command line replacements will be something like: Bot: Automated text replacement  (-a +b)
Press Enter to use this automatic message, or enter a description of the
changes your bot will make:
WARNING: filter(s) specified but no generators.
ERROR: Unable to execute script because no generator was defined.
Use -help for further information.
$pwb.py version
Pywikibot: [https] r-pywikibot-core.git (0185ec2, g10525, 2018/12/21, 14:13:13, ok)
Release version: 3.1.dev0
requests version: 2.19.1
  cacerts: /srv/paws/lib/python3.6/site-packages/certifi/cacert.pem
    certificate test: ok
Python: 3.6.3 (default, Oct  3 2017, 21:45:48)
[GCC 7.2.0]

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptDec 23 2018, 1:07 AM
Arjunaraoc updated the task description. (Show Details)Dec 23 2018, 1:12 AM
Zoranzoki21 added a subscriber: Zoranzoki21.

I saw this and at other scripts. Thanks for report!

JJMC89 updated the task description. (Show Details)
JJMC89 closed this task as Invalid.Dec 23 2018, 3:12 AM
JJMC89 added a subscriber: JJMC89.

As the warning says, a generator was not provided, only a filter (-titleregex).

If you want to work on all pages, you could use -start.