Page MenuHomePhabricator

pagegen regex 'none' filter command line argument
Open, Needs TriagePublic

Description

pagegenerators RegexFilter supports three mode of regex matching: 'all', 'any' or 'none' , available when performing filtering based on page title or page content.

'all' - yields page if title/content is matched by all regexes
'any' - yields page if title/content is matched by any regexes
'none' - yields page if title/content is NOT matched by any regexes

However on the command line, -titleregex and -grep arguments are combined using 'any' mode.

It would be very useful to provide command line support for 'none' mode, as this allows pages to be excluded if they match.

That would provide a partial solution to T71286 , as it wouldnt process pages containing placeholders, and could therefore be run in a more autonomous mode.

Another example usage is ... we had a IRC support request recently where someone wanted to use cosmetic changes on all pages in a namespace, except when the page was in a category / transcluded a template. A regex could exclude the pages which shouldnt be touched.

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot.
jayvdb changed Security from none to None.
jayvdb subscribed.

T103779 is a more general solution for this problem.