Page MenuHomePhabricator

-titleregex only searches mainspace
Closed, ResolvedPublic

Description

Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1386/
Reported by: bewareofdoug
Created on: 2011-12-06 22:56:55
Subject: -titleregex only searches mainspace
Original description:
Using the -titleregex parameter to a replace.py on the wikimedia commons only gets me hits in the main \(gallery\) space not in file/image space where I need it to. setting -namespace:6 does nothing and setting -prefixindex:file 'adds' mainspace content with the word file in front. The same result is obtained when attempting to look in userspace \(though I didn't try it with -namespace:\). An example is:
python replace.py -titleregex:".\*Nietzsche.\*" foooooooo bar

version.py output:
Pywikipedia \[http\] trunk/pywikipedia \(r9787, 2011/12/06, 07:41:04\)
Python 2.6.1 \(r261:67515, Jun 24 2010, 21:47:49\)
\[GCC 4.2.1 \(Apple Inc. build 5646\)\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok


Version: unspecified
Severity: normal
See Also:
https://sourceforge.net/p/pywikipediabot/bugs/1386

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:28 AM
bzimport set Reference to bz55226.
bzimport added a subscriber: Unknown Object (????).

To clarify, most of the files in http://commons.wikimedia.org/wiki/Category:Nietzsche%27s\_Werke or any of its subcats, should have been found, to name just a few hundred - as well as the category itself, I suppose.

jayvdb subscribed.

Keeping the original bug; the other one can be re-purposed.

Change 181993 had a related patch set uploaded (by John Vandenberg):
Pagegenerators: ns handling for titleregex option

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

Patch-For-Review

jayvdb edited projects, added Pywikibot-pagegenerators.py; removed Pywikibot-General.
jayvdb set Security to None.
jayvdb removed a subscriber: Unknown Object (????).

Change 181993 merged by jenkins-bot:
Pagegenerators: ns handling for titleregex option

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

Mpaa removed a project: Patch-For-Review.