Bugs item #2544854, was opened at 2009-01-29 07:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2544854&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Wron Specialpage-link for cu-wiki
Initial Comment:
The special page on cu-wiki couldn't be opened. I checked the link and i found it must be http://cu.wikipedia.org/wiki/%D0%9D%D0%B0%D1%80%D0%BE%CC%81%D1%87%D1%8C%D0%… instead of the given one.
[de:USer:Xqt]
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2544854&group_…
Bugs item #2539701, was opened at 2009-01-27 07:32
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2539701&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: other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: redirect.py Exception handing
Initial Comment:
Running through yi-wiki I've found that there should be an additional exception handling for the get_moved_pages_redirects - Method in redirect.py as follows:
except wikipedia.NoPage:
# original title must have been deleted after move
continue
+ except wikipedia.IsNotRedirectPage:
+ continue
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2009-01-29 05:41
Message:
There is an other Error which should be handled by exception in redirect.py
in the fix_double_redirect - method. If one page forms a redirect loop
and the self link directs to a nonexistent section, a SectionError would be
raised:
>>>Earhworm Jim PSP<<<
Links to [[Earthworm Jim PSP#Earthworm Jim PSP]].
Warning: Redirect target [[Earthworm Jim PSP#Earthworm Jim PSP]] forms a
redirect loop.
Traceback (most recent last):
...
File "C:\..\redirect.py in fix_double_redirects
content=targetPage.get(get_redirect=True)
File "C:\..\wikipedia.py in get self._contents = self._getEditpage(...)
File "C:\..\wikipedia.py in _getEditpage
raise SectionError # Page has no section by this name
wikipedia.SectionError
[de:User:Xqt]
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2539701&group_…
Revision: 6309
Author: russblau
Date: 2009-01-28 19:41:32 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
Enable category redirect checking.
Usage (where c is a Page in the category namespace):
c.isCategoryRedirect(): returns True if the page contains a category redirect template listed in the family file; False otherwise
c.getCategoryRedirectTarget(): returns the redirect target category as a catlib.Category object; raises IsNotRedirectPage if c is not a category redirect
Note that isRedirect() and getRedirectTarget() are not affected; if you want a script to check for category redirects, you have to modify it to do so explicitly (this is to preserve backwards-compatibility).
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2009-01-28 18:28:30 UTC (rev 6308)
+++ trunk/pywikipedia/wikipedia.py 2009-01-28 19:41:32 UTC (rev 6309)
@@ -834,10 +834,6 @@
self._redirarg = redirtarget
else:
raise IsRedirectPage(redirtarget)
-## elif self.isCategoryRedirect(): # sets _redirarg
-## if not get_redirect:
-## self._getexception = IsRedirectPage
-## raise IsRedirectPage, self._redirarg
if self.section():
# TODO: What the hell is this? Docu please.
m = re.search("\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\.3D" % re.escape(self.section()), sectionencode(text,self.site().encoding()))
@@ -1086,26 +1082,33 @@
"""Return True if this is an image description page, False otherwise."""
return self.namespace() == 6
- def isCategoryRedirect(self):
- """Return True if this is a category redirect page."""
+ def isCategoryRedirect(self, text=None):
+ """Return True if this is a category redirect page, False otherwise."""
if not self.isCategory():
return False
if not hasattr(self, "_catredirect"):
- if not hasattr( self.site(), "category_redirects"):
+ if not text:
+ text = self.get(get_redirect=True)
+ catredirs = self.site().category_redirects()
+ for (t, args) in self.templatesWithParams(thistxt=text):
+ template = Page(self.site(), t, defaultNamespace=10
+ ).titleWithoutNamespace() # normalize title
+ if template in catredirs:
+ # Get target (first template argument)
+ self._catredirect = self.site().namespace(14) + ":" + args[0]
+ break
+ else:
self._catredirect = False
- else:
- catredirs = self.site().category_redirects()
- for (t, args) in self.templatesWithParams():
- if t in catredirs:
- self._catredirect = True
- # Get target (first template argument)
- self._redirarg = self.site().namespace(14) + ":" + args[0]
- break
- else:
- self._catredirect = False
- return self._catredirect
+ return bool(self._catredirect)
+ def getCategoryRedirectTarget(self):
+ """If this is a category redirect, return the target category title."""
+ if self.isCategoryRedirect():
+ import catlib
+ return catlib.Category(self.site(), self._catredirect)
+ raise IsNotRedirectPage
+
def isDisambig(self):
"""Return True if this is a disambiguation page, False otherwise.
@@ -2986,6 +2989,8 @@
page2._revisionId = revisionId
page2._editTime = timestamp
section = page2.section()
+ # Store the content
+ page2._contents = text
m = self.site.redirectRegex().match(text)
if m:
## output(u"%s is a redirect" % page2.aslink())
@@ -2994,6 +2999,7 @@
redirectto = redirectto+"#"+section
page2._getexception = IsRedirectPage
page2._redirarg = redirectto
+
# This is used for checking deletion conflict.
# Use the data loading time.
page2._startTime = time.strftime('%Y%m%d%H%M%S', time.gmtime())
@@ -3006,8 +3012,6 @@
except AttributeError:
# There is no exception yet
page2._getexception = SectionError
- # Store the content
- page2._contents = text
successful = True
# Note that there is no break here. The reason is that there
# might be duplicates in the pages list.
@@ -5244,7 +5248,7 @@
if leend != None: params['leend'] = leend
if leend != None: params['leuser'] = leuser
if leend != None: params['letitle'] = letitle
-
+
data = query.GetData(params,
useAPI = True, encodeTitle = False)
try:
Hi guys,
Currently this list is flooded with automated messages from Sourceforge
and svn commits.
I propose to split up the list so it's workable again.
-pywikipeida-l - discussion by humans
-pywikipedia-svn - svn commits
-pywikipedia-bugs - automated bug mails (now by sourceforge maybe in the
future by Jira)
-pywikipedia-announce - important announcements
This set up of lists is similair to that of mediawiki (
https://lists.wikimedia.org/mailman/listinfo ).
Any comments/suggestions?
Maarten
Bugs item #2018606, was opened at 2008-07-15 14:16
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2018606&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: BartekChom (bartekchom)
Assigned to: Nobody/Anonymous (nobody)
Summary: sorting order on Polish Wikipedia
Initial Comment:
Interwiki sorting order on Polish Wikipedia is now on
http://pl.wikipedia.org/wiki/Pomoc:Interwiki#Tablica_dla_skrypt.C3.B3w
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-01-28 14:45
Message:
Well althought I have troubles to understand the submitter and polish,
http://meta.wikimedia.org/wiki/Interwiki_sorting_order has been updated,
and links to the polish page, which *seems* to be policy there
I think that we can accept this request, can we?
----------------------------------------------------------------------
Comment By: BartekChom (bartekchom)
Date: 2009-01-28 14:37
Message:
Now the discusion showed, that possible change should be disputed on meta.
----------------------------------------------------------------------
Comment By: siebrand (siebrand)
Date: 2009-01-27 09:22
Message:
Submitter, please respond, or this request will be rejected.
----------------------------------------------------------------------
Comment By: BartekChom (bartekchom)
Date: 2008-07-18 13:39
Message:
Logged In: YES
user_id=2138875
Originator: YES
Actualisation (for example cbk-zam, zh-classical, ug) and ISO 9:1995 (for
example bg, ky). But what rules use exacly English? Maybe they would like
to change them or when we anderstand their rules, we accept them.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-07-16 16:29
Message:
Logged In: YES
user_id=1963242
Originator: NO
okay... Well... what is this, for those that don't read polish ? It looks
close from the alphabetic order, but some things have changed... why ?
Please update first http://meta.wikimedia.org/wiki/Interwiki_sorting_order
before asking for this change, or there'll be havoc on pl.wp if pywikipedia
uses a certain order while other tools use another :)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2018606&group_…
Bugs item #2018606, was opened at 2008-07-15 14:16
Message generated for change (Comment added) made by bartekchom
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2018606&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: BartekChom (bartekchom)
Assigned to: Nobody/Anonymous (nobody)
Summary: sorting order on Polish Wikipedia
Initial Comment:
Interwiki sorting order on Polish Wikipedia is now on
http://pl.wikipedia.org/wiki/Pomoc:Interwiki#Tablica_dla_skrypt.C3.B3w
----------------------------------------------------------------------
>Comment By: BartekChom (bartekchom)
Date: 2009-01-28 14:37
Message:
Now the discusion showed, that possible change should be disputed on meta.
----------------------------------------------------------------------
Comment By: siebrand (siebrand)
Date: 2009-01-27 09:22
Message:
Submitter, please respond, or this request will be rejected.
----------------------------------------------------------------------
Comment By: BartekChom (bartekchom)
Date: 2008-07-18 13:39
Message:
Logged In: YES
user_id=2138875
Originator: YES
Actualisation (for example cbk-zam, zh-classical, ug) and ISO 9:1995 (for
example bg, ky). But what rules use exacly English? Maybe they would like
to change them or when we anderstand their rules, we accept them.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-07-16 16:29
Message:
Logged In: YES
user_id=1963242
Originator: NO
okay... Well... what is this, for those that don't read polish ? It looks
close from the alphabetic order, but some things have changed... why ?
Please update first http://meta.wikimedia.org/wiki/Interwiki_sorting_order
before asking for this change, or there'll be havoc on pl.wp if pywikipedia
uses a certain order while other tools use another :)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2018606&group_…
Revision: 6306
Author: wikipedian
Date: 2009-01-27 20:38:34 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
Bugfix:
replace.py a b -xml:mydump.xml -namespace:0 also changed pages in other
namespaces.
This is still not an ideal solution, as pages in other namespaces are still
processed in the XmlDumpReplacePageGenerator. This takes a lot of time,
especially for large deletion logs etc. which are in the Wikipedia
namespace.
cydeweys, russblau and the others: it would be nice if you would review my
changes, and also try to come up with a more elegant solution. Once we have
agreed on a good solution, we also need to make similar changes to other
scripts, such as selflink.py, table2wiki.py, and template.py. --Daniel
Modified Paths:
--------------
trunk/pywikipedia/pagegenerators.py
trunk/pywikipedia/replace.py
Modified: trunk/pywikipedia/pagegenerators.py
===================================================================
--- trunk/pywikipedia/pagegenerators.py 2009-01-27 19:58:05 UTC (rev 6305)
+++ trunk/pywikipedia/pagegenerators.py 2009-01-27 20:38:34 UTC (rev 6306)
@@ -806,11 +806,15 @@
self.namespaces = []
"""
- This function returns the combination of all accumulated generators
- that have been created in the process of handling arguments.
- Only call it after all arguments have been parsed.
+ This method returns the combination the given generator and all
+ accumulated generators that have been created in the process of handling
+ arguments.
+
+ Only call this method after all arguments have been parsed.
"""
- def getCombinedGenerator(self):
+ def getCombinedGenerator(self, gen = None):
+ if gen:
+ self.gens.insert(0, gen)
if (len(self.gens) == 0):
return None
if (len(self.gens) == 1):
Modified: trunk/pywikipedia/replace.py
===================================================================
--- trunk/pywikipedia/replace.py 2009-01-27 19:58:05 UTC (rev 6305)
+++ trunk/pywikipedia/replace.py 2009-01-27 20:38:34 UTC (rev 6306)
@@ -684,9 +684,8 @@
for PageTitle in PageTitles]
gen = iter(pages)
+ gen = genFactory.getCombinedGenerator(gen)
if not gen:
- gen = genFactory.getCombinedGenerator()
- if not gen:
# syntax error, show help text from the top of this file
wikipedia.showHelp('replace')
return
Bugs item #2542576, was opened at 2009-01-28 09:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2542576&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: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Herding (wikipedian)
Assigned to: Nobody/Anonymous (nobody)
Summary: Use the unlocalized magic word '#REDIRECT' in jawp
Initial Comment:
The following is a copy of a message to the pywikipedia-l mailing list, because nobody answered there.
Hello everyone.
I'm a sysop in Japanese Wikipedia.
Please make a little change for pywiki. In JAWP the magic word '転送'(
the localized magic word of 'REDIRECT') don't work because of, I think, a bug of a MediaWiki extention. One bot made many unworkable redirect pages. Please use the magic word unlocalized 'REDIRECT' in jawp.
----
mizusumashi
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2542576&group_…