[Pywikipedia-l] match and list, but not replace
Nicolas Dumazet
nicdumz at gmail.com
Mon Apr 12 08:31:25 UTC 2010
Hello,
2010/4/1 Chris Watkins <chriswaterguy at appropedia.org>:
> I want to generate a list of matches for a search, but not do anything to
> the page.
>
> E.g. I want to list all pages that contain "redirect[[:Category", but I
> don't want to modify the pages.
List pages? That's a job for pagegenerators.py
python pagegenerators.py -search[.....]
But honestly Chris, as I wrote before, you should try to learn Python.
It's not this hard :)
The time required to write a 3 lines long code snippet yielding all
pages matching a Mediawiki search (2 minutes) should be about 500
times shorter than the average latency of this mailing list:
from pagegenerators import SearchPageGenerator
for page in SearchPageGenerator("my query"):
print page
I haven't been coding with pywikipedia for months, this code is
provided without any guarantee. But you get the simplicity of the
operation I guess :)
Best regards,
Nicolas.
>
> I guess that it's possible to modify redirect.py (I don't speak python, but
> it shouldn't be hard) and run it with -log. But maybe there's a simpler way?
>
> Thanks in advance.
>
> --
> Chris Watkins
>
> Appropedia.org - Sharing knowledge to build rich, sustainable lives.
>
> blogs.appropedia.org
> community.livejournal.com/appropedia
> identi.ca/appropedia
> twitter.com/appropedia
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
>
--
Nicolas Dumazet — NicDumZ
More information about the Pywikipedia-l
mailing list