Bugs item #1892742, was opened at 2008-02-13 15:04
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1892742&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: JAn (jandudik)
Assigned to: Nobody/Anonymous (nobody)
Summary: removing valid interwiki
Initial Comment:
There is one problem:
there are articles in another language in another namespace (typically es:Anexo:... for sport events or fi:Wikipedia:English Wikipedia for articles of wikipedia or some pages in nmespaces Wikipedia x Help x Portal ...)
when I run bot with -autonomous, it skip these limks
when I run with -autonomous -force, bot remove these valid links.
without -auonomous I must confirm every article
Try run bot
-start:anexo:A -lang:es -autonomous => bot skip everything
----------------------------------------------------------------------
>Comment By: NicDumZ Nicolas Dumazet (nicdumz)
Date: 2008-06-23 10:33
Message:
Logged In: YES
user_id=1963242
Originator: NO
fixed in r5614 :)
----------------------------------------------------------------------
Comment By: Andre Engels (a_engels)
Date: 2008-02-13 15:35
Message:
Logged In: YES
user_id=843018
Originator: NO
This is caused by Anexo: being a separate namespace on es:, but the same
thing (lists, if I recall correctly) being in the main namespace on other
languages. Maybe we should have some kind of list in the family file to say
which namespaces may be connected.
However, even if that is done: I would strongly advise NOT to combine
-autonomous with -force. This will cause too many deletions in cases where
instead of deletion there should be a change (Chinese traditional
orthography, pages that were valid pages but are now disambiguation pages).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1892742&group_…
Bugs item #1970896, was opened at 2008-05-24 00:25
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1970896&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki cross-namespace in eswiki
Initial Comment:
Some anonymous make notice to me, they say if I use interwiki.py include -force and -autnomous, it will remove es interwiki all about list or game result (They use new namespace 104 "Anexo" to save the page), but if I use that without -force, I cannot remove the non-exist link.
I think maybe pybot may ignore this settings only in some languages like es, set this namespace like ns0 and don't care the cross namespaces problem.
(link: http://nl.wikipedia.org/w/index.php?title=Grand_Prix_van_China_2007&diff=pr… )
----------------------------------------------------------------------
>Comment By: NicDumZ Nicolas Dumazet (nicdumz)
Date: 2008-06-23 10:32
Message:
Logged In: YES
user_id=1963242
Originator: NO
fixed in r5614 :)
----------------------------------------------------------------------
Comment By: Stig Meireles Johansen (stigmj)
Date: 2008-06-14 12:05
Message:
Logged In: YES
user_id=2116333
Originator: NO
I have made a patch to allow for cross-namespace-mappings. It remains to
be revised and approved. Check
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1992057&group_…
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1970896&group_…
Patches item #1992057, was opened at 2008-06-12 16:26
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1992057&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Accepted
>Priority: 6
Private: No
Submitted By: Stig Meireles Johansen (stigmj)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add support for cross-namespace interwiki
Initial Comment:
This patch will add support for a mapping of allowed interwikis between namespaces. I have done a quick mapping, but it may very well need some more tuning.
The diff is done against r5562.
----------------------------------------------------------------------
>Comment By: NicDumZ Nicolas Dumazet (nicdumz)
Date: 2008-06-23 10:31
Message:
Logged In: YES
user_id=1963242
Originator: NO
Thanks for your lengthy answer, it helps :)
Reviewed and applied it in r5614, with some documentation, and minor
rewrites in interwiki.py.
Thanks for the original patch :)
----------------------------------------------------------------------
Comment By: Stig Meireles Johansen (stigmj)
Date: 2008-06-17 23:39
Message:
Logged In: YES
user_id=2116333
Originator: YES
Well, generally there should not be interwiki-links between namespaces,
but as a rule goes, there are exceptions. The spanish wikipedia uses
namespace 104 for lists and other addendum which lives in regular namespace
0 on the other wikipedias. The portuguese has chosen to use namespace 102
for the same use. These namespaces on the selected wikipedias should be
allowed to have interwikis without questions asked.
My patch makes a cross-namespace dictionary/list which allows for mapping
which namespaces on which languages can link other
namespace/language-combinations.
What is does is as follows:
* originPage has namespace 0 and language-code en.
* linkedPage has namespace 104 and language-code es.
1) Lookup in the crossnamespace-dictionary (using the namespace of the
originPage as the index) for the language-code of the originPage.
2) If this does not exist, Lookup in the crossnamespace-dictionary (using
the namespace of the originPage as the index) for the default-code
3) If this does not exist, there is no mapping defined for this
namespace/language-code pair, and we skip further checking
4) If it *does* exist, we now have a link to a new dictionary, and we make
a lookup for the language-code of the linkedPage.
5) If this does not exist, make a lookup for the default-code.
6) If any of the lookups in 4) and 5) gives a value, we have a list of
allowed namespaces in the linkedPage-language we can link to the
originPage.
7) Check if there are any occurences of the namespace of the linkedPage in
the list we obtained in 6).
8) If there is a match, we have a valid interwiki between namespaces, and
don't need to do any more processing in the namespaceMismatch-function.
I see there are several entries for this functionality in the bug-system
as well:
https://sourceforge.net/tracker/index.php?func=detail&aid=1970896&group_id=…https://sourceforge.net/tracker/index.php?func=detail&aid=1892742&group_id=…
Here are some good edits (with the patch):
http://en.wikipedia.org/w/index.php?title=Sailing_at_the_2000_Summer_Olympi…http://en.wikipedia.org/w/index.php?title=Elvis_Presley_discography&diff=pr…
While this was a bad edit (without the patch):
http://en.wikipedia.org/w/index.php?title=Sailing_at_the_2000_Summer_Olympi…
----------------------------------------------------------------------
Comment By: NicDumZ Nicolas Dumazet (nicdumz)
Date: 2008-06-15 17:09
Message:
Logged In: YES
user_id=1963242
Originator: NO
Well, thanks for the patch.
Could you provide us some more info on this "cross-namespace interwiki" ?
I've looked at your patch, and honestly I'm not sure of what it is supposed
to do ?! (I'm not saying that this is a bad patch, I'm saying that I don't
see what mediawiki feature it supports)
Can I get an example of the intended behavior, please ? :)
----------------------------------------------------------------------
Comment By: Stig Meireles Johansen (stigmj)
Date: 2008-06-12 19:16
Message:
Logged In: YES
user_id=2116333
Originator: YES
File Added: pywikipedia-5562-crossnamespace-diff.patch
----------------------------------------------------------------------
Comment By: Stig Meireles Johansen (stigmj)
Date: 2008-06-12 17:52
Message:
Logged In: YES
user_id=2116333
Originator: YES
File Added: pywikipedia-5562-crossnamespace-diff.patch
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1992057&group_…
Feature Requests item #1880563, was opened at 2008-01-27 01:54
Message generated for change (Comment added) made by leogregianin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1880563&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Mike.lifeguard (mike_lifeguard)
>Assigned to: Leonardo Gregianin (leogregianin)
Summary: upgrade parameters in fixing_redirects.py
Initial Comment:
1) add support for -file and -cat at a minimum
2) there may be a bug in -start (I haven't tested this much, so I can't be sure)
3) fixing_redirects.py doesn't tell you that -namespace and -start are options; you have to look in the code
4) some way of logging redirects which have been orphaned would be nice. Depending on how this is done, it might require a new module; User:Mike.lifeguard@enwikibooks would be happy to attempt to figure out the logic required with someone who knows python
----------------------------------------------------------------------
>Comment By: Leonardo Gregianin (leogregianin)
Date: 2008-06-22 22:46
Message:
Logged In: YES
user_id=1136737
Originator: NO
Works for me:
>>>fixing_redirects.py -start:r -namespace:5
Checked for running processes. 1 processes currently running, including
the curr
ent process.
Retrieving Allpages special page for wikipedia:pt from r, namespace 5
>>> Wikipedia Discusso:Reciclagem <<<
Getting 4 pages from wikipedia:pt...
global params fixed in r5611.
Thnaks,
leonardo
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1880563&group_…
Feature Requests item #1988532, was opened at 2008-06-08 22:55
Message generated for change (Comment added) made by leogregianin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1988532&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Mike.lifeguard (mike_lifeguard)
>Assigned to: Leonardo Gregianin (leogregianin)
Summary: fixing_redirects.py needs a batch option
Initial Comment:
fixing_redirects.py needs to be able to work in batches. Whether with -start or -file or something... but doing -page over and over is just silly.
----------------------------------------------------------------------
>Comment By: Leonardo Gregianin (leogregianin)
Date: 2008-06-22 22:45
Message:
Logged In: YES
user_id=1136737
Originator: NO
fix in r5611
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1988532&group_…
Revision: 5611
Author: leogregianin
Date: 2008-06-23 02:44:29 +0000 (Mon, 23 Jun 2008)
Log Message:
-----------
Fixes: 1988532 fixing_redirects.py needs a batch option,
1880563 upgrade parameters in fixing_redirects.py
Modified Paths:
--------------
trunk/pywikipedia/fixing_redirects.py
Modified: trunk/pywikipedia/fixing_redirects.py
===================================================================
--- trunk/pywikipedia/fixing_redirects.py 2008-06-23 02:13:25 UTC (rev 5610)
+++ trunk/pywikipedia/fixing_redirects.py 2008-06-23 02:44:29 UTC (rev 5611)
@@ -8,6 +8,9 @@
-featured Run over featured pages
-page:XXX Run over only one page
+Run fixing_redirects.py -help to see all the command-line
+options -file, -ref, -links, ...
+
"""
#
# This script based on disambredir.py and solve_disambiguation.py
@@ -20,6 +23,12 @@
import pagegenerators
import re, sys
+# This is required for the text that is shown when you run this script
+# with the parameter -help.
+docuReplacements = {
+ '¶ms;': pagegenerators.parameterHelp,
+}
+
msg = {
'ar': u'بوت: إصلاح التحويلات',
'en': u'Bot: Fixing redirects',
@@ -122,6 +131,7 @@
return text
def workon(page):
+ mysite = wikipedia.getSite()
try:
text = page.get()
except wikipedia.IsRedirectPage:
@@ -139,12 +149,18 @@
comment = wikipedia.translate(mysite, msg)
page.put(text, comment)
-try:
+def main():
start = '!'
featured = False
title = None
namespace = None
+ gen = None
+ # This factory is responsible for processing command line arguments
+ # that are also used by other scripts and that determine on which pages
+ # to work on.
+ genFactory = pagegenerators.GeneratorFactory()
+
for arg in wikipedia.handleArgs():
if arg.startswith('-start'):
if len(arg) == 6:
@@ -163,6 +179,10 @@
namespace = int(wikipedia.input(u'Which namespace should be processed?'))
else:
namespace = int(arg[11:])
+ else:
+ generator = genFactory.handleArg(arg)
+ if generator:
+ gen = generator
mysite = wikipedia.getSite()
if mysite.sitename() == 'wikipedia:nl':
@@ -183,9 +203,14 @@
elif namespace is not None:
for page in pagegenerators.AllpagesPageGenerator(start=start, namespace=namespace, includeredirects=False):
workon(page)
+ elif gen:
+ for page in pagegenerators.PreloadingGenerator(gen):
+ workon(page)
else:
wikipedia.showHelp('fixing_redirects')
- sys.exit()
-finally:
- wikipedia.stopme()
+if __name__ == "__main__":
+ try:
+ main()
+ finally:
+ wikipedia.stopme()