Page MenuHomePhabricator

Move -except from add_text.py and -excepttext from replace.py to global page generator filters
Closed, ResolvedPublicFeature

Description

In add_text.py there is -except param and in replace.py there is an -excepttext param, which are the exact opposite of -grep param in global page generator filters. Move it from these locations to global page generator params and perhaps rename it to -grep:not (similar to -ns:not).

Also note that there could be other similar parameters in other scripts, this option should replace them all (just maybe in multiple commits)

Event Timeline

Dvorapa renamed this task from Move -except from add_text.py to global page generator filters to Move -except from add_text.py and -excepttext from replace.py to global page generator filters.Mar 26 2019, 1:50 PM
Dvorapa updated the task description. (Show Details)
Dvorapa added a project: Pywikibot-replace.py.

I'm willing to work on this. @Xqt , got any comments?

I would suggest -grep and -grepnot, similar to -titleregex and -titleregexnot.

Change 639204 had a related patch set uploaded (by Diwanshu885; owner: Diwanshu885):
[pywikibot/core@master] Move -except and -excepttext to global page generator filters

https://gerrit.wikimedia.org/r/639204

Xqt triaged this task as Low priority.Dec 10 2020, 1:01 PM
Xqt changed the subtype of this task from "Task" to "Feature Request".

-excepttext from replace.py has a different meaning which depends on the -regex Option. Probably this task is valid for add_text only.

Change 639204 merged by jenkins-bot:
[pywikibot/core@master] Move -except and -excepttext to global page generator filters

https://gerrit.wikimedia.org/r/639204

Xqt removed a project: Pywikibot-replace.py.