---------- Forwarded message ----------
From: <pywikipediabot-users-owner(a)lists.sourceforge.net>
Date: Wed, Feb 27, 2008 at 8:03 PM
Subject: How do I make interwiki.py go over all the pages in a given namespace?
To: avarab(a)gmail.com
You are not allowed to post to this mailing list, and your message has
been automatically rejected. If you think that your messages are
being rejected in error, contact the mailing list owner at
pywikipediabot-users-owner(a)lists.sourceforge.net.
---------- Forwarded message ----------
From: "Ævar Arnfjörð Bjarmason" <avarab(a)gmail.com>
To: pywikipediabot-users(a)lists.sourceforge.net
Date: Wed, 27 Feb 2008 20:03:50 +0000
Subject: How do I make interwiki.py go over all the pages in a given namespace?
I was trying to go over all the pages in the category namespace, I
couldn't get -namespace:14 or -namespace:Category,
-namespace:Category:'!' or -namespace:Flokkur (this was on iswiki) to
work.
I ended up running it as `python interwiki.py -autonomous -skipauto
-namespace:14 -continue' with the following hack, this seems to be
working but is there a proper way to do this?
Index: interwiki.py
===================================================================
--- interwiki.py (revision 5080)
+++ interwiki.py (working copy)
@@ -1620,7 +1620,10 @@
except NameError:
wikipedia.output(u"Dump file is empty?! Starting
at the beginning.")
nextPage = "!"
- namespace = 0
+ if namespaces:
+ namespace = namespaces[0]
+ else:
+ namespace = 0
# old generator is used up, create a new one
hintlessPageGen =
pagegenerators.CombinedPageGenerator([pagegenerators.TextfilePageGenerator(dumpFileName),\
pagegenerators.AllpagesPageGenerator(nextPage, namespace,
includeredirects = False)])