Bugs item #1864659, was opened at 2008-01-05 14:35
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1864659&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: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cannot input parameter without english
Initial Comment:
I run interwiki.py and replace.py, all reback "UnicodeDecodeError: 'utf8' codec can't decode byte...." when I type Chinese and Japanese
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2008-06-24 22:20
Message:
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-06-10 07:10
Message:
Logged In: YES
user_id=181280
Originator: NO
Where do you type Chinese and Japanese characters? Please, provide full
command line you input in your console and response by the python script.
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-01-11 10:08
Message:
Logged In: YES
user_id=1327030
Originator: NO
You may have to replace it, depending on the Windows locale. No idea how
you can type Chinese and Japanese characters, though. You can also try to
remove it from user-config.py. The documentation of the console_encoding
variable also suggests cp850 (and cp437 for older versions).
----------------------------------------------------------------------
Comment By: Alex S.H. Lin (lin4h)
Date: 2008-01-09 00:49
Message:
Logged In: YES
user_id=1902991
Originator: YES
OS is Windows XP Professional and config encode is UTF8 non-BOM
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-01-06 14:10
Message:
Logged In: YES
user_id=1327030
Originator: NO
It doesn't for me. Which operating system do you use, and what are your
encoding settings in user-config.py?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1864659&group_…
Patches item #2001978, was opened at 2008-06-25 03:12
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2001978&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: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: update for zh locale, and others
Initial Comment:
redirect.py : Make speedy deletion for broken redirects i18n.
family.py : add as,hu info
wikinews_family.py : add cs
wikibooks_family.py : modify hu
wiktionary_family.py: modify hu and add obsolete info
wikipedia_family.py : add as
wikiquote_family.py : modify ko,hu and add obsolete info
interwiki.py : modify zh
selflink.py, protect.py,imagetransfer.py, welcome.py, table2wiki.py, movepages.py : add zh or ja locale.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2001978&group_…
Revision: 5628
Author: filnik
Date: 2008-06-24 13:36:36 +0000 (Tue, 24 Jun 2008)
Log Message:
-----------
Upper case, as default
Modified Paths:
--------------
trunk/pywikipedia/family.py
Modified: trunk/pywikipedia/family.py
===================================================================
--- trunk/pywikipedia/family.py 2008-06-24 13:26:13 UTC (rev 5627)
+++ trunk/pywikipedia/family.py 2008-06-24 13:36:36 UTC (rev 5628)
@@ -2849,7 +2849,7 @@
'kk': [u'айдау'],
'mzn': [u'تغییرمسیر'],
'nn': [u'omdiriger'],
- 'ru': [u'redirect', u'перенаправление', u'перенапр'], # localised version is not so used, so put the default
+ 'ru': [u'REDIRECT', u'перенаправление', u'перенапр'], # localised version is not so used, so put the default
# one as the most used.
'sk': [u'presmeruj'],
'sr': [u'преусмери',u'Преусмери'], # Using lowercase only doesn't work?
Patches item #1986308, was opened at 2008-06-06 11:26
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1986308&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: Melancholie (melancholie)
Assigned to: Nobody/Anonymous (nobody)
Summary: good.py
Initial Comment:
I have forked featured.py (my updated version, see #1985288).
The script good.py will do the very same like featured.py,
but for "good articles" (not for featured ones)!
Script source:
http://als.wikipedia.org/w/index.php?title=Benutzer:MelancholieBot/good.py&…
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-06-24 12:48
Message:
Logged In: NO
I think it is hard to integrate it, is a different concept.
----------------------------------------------------------------------
Comment By: Leonardo Gregianin (leogregianin)
Date: 2008-06-23 00:34
Message:
Logged In: YES
user_id=1136737
Originator: NO
Could you integrate the good.py within featured.py? Because the good.py is
basically the same script, the change is minimal. Regards, leonardo.
----------------------------------------------------------------------
Comment By: John (compwhizii)
Date: 2008-06-15 16:02
Message:
Logged In: YES
user_id=1924813
Originator: NO
Excuse my last comment.....
----------------------------------------------------------------------
Comment By: John (compwhizii)
Date: 2008-06-15 16:01
Message:
Logged In: YES
user_id=1924813
Originator: NO
C:\Documents and Settings\john2\My Documents\fixrd.patch
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1986308&group_…
Revision: 5626
Author: nicdumz
Date: 2008-06-24 10:43:18 +0000 (Tue, 24 Jun 2008)
Log Message:
-----------
Section title were encoded in aslink(), obfuscating the interwiki links, see for example http://fr.wikipedia.org/w/index.php?title=Tom_Clancy%27s_Ghost_Recon:_Islan…
Changing this behavior adding a decode parameter to Page::section & Page::title (defaulting to False)
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2008-06-24 07:59:02 UTC (rev 5625)
+++ trunk/pywikipedia/wikipedia.py 2008-06-24 10:43:18 UTC (rev 5626)
@@ -474,13 +474,19 @@
"""Return the character encoding used on this Page's wiki Site."""
return self._site.encoding()
- def title(self, underscore = False, savetitle = False):
+ def title(self, underscore = False, savetitle = False, decode=False):
"""Return the title of this Page, as a Unicode string.
If underscore is True, replace all ' ' characters with '_'.
If savetitle is True, encode any wiki syntax in the title.
+ If decode is True, decodes the section title
"""
title = self._title
+ if decode:
+ begin = title.find('#')
+ if begin != -1:
+ anchor = self.section(underscore = underscore, decode = True)
+ title = title[:begin + 1] + anchor
if savetitle:
# Ensure there's no wiki syntax in the title
title = title.replace(u"''", u'%27%27')
@@ -495,13 +501,19 @@
else:
return self.sectionFreeTitle(underscore=underscore).split(':', 1)[1]
- def section(self, underscore = False):
+ def section(self, underscore = False, decode=False):
"""Return the name of the section this Page refers to.
The section is the part of the title following a '#' character, if any.
If no section is present, return None.
"""
- return self._section
+ section = self._section
+ if section and decode:
+ section = section.replace('.', '%')
+ section = url2unicode(section, self._site)
+ if not underscore:
+ section = section.replace('_', ' ')
+ return section
def sectionFreeTitle(self, underscore=False):
"""Return the title of this Page, without the section (if any)."""
@@ -543,14 +555,14 @@
and self.site().family.name != self.site().lang:
return u'[[%s:%s:%s]]' % (self.site().family.name,
self.site().lang,
- self.title(savetitle=True))
+ self.title(savetitle=True,decode=True))
else:
return u'[[%s:%s]]' % (self.site().lang,
- self.title(savetitle=True))
+ self.title(savetitle=True,decode=True))
elif textlink and (self.isImage() or self.isCategory()):
- return u'[[:%s]]' % self.title(savetitle=True)
+ return u'[[:%s]]' % self.title(savetitle=True,decode=True)
else:
- return u'[[%s]]' % self.title(savetitle=True)
+ return u'[[%s]]' % self.title(savetitle=True, decode=True)
def autoFormat(self):
"""Return (dictName, value) if title is in date.autoFormat dictionary.
Revision: 5625
Author: nicdumz
Date: 2008-06-24 07:59:02 +0000 (Tue, 24 Jun 2008)
Log Message:
-----------
this script was broken from its initial rev, was it ?
Modified Paths:
--------------
trunk/pywikipedia/fixing_redirects.py
Modified: trunk/pywikipedia/fixing_redirects.py
===================================================================
--- trunk/pywikipedia/fixing_redirects.py 2008-06-24 02:38:46 UTC (rev 5624)
+++ trunk/pywikipedia/fixing_redirects.py 2008-06-24 07:59:02 UTC (rev 5625)
@@ -65,6 +65,9 @@
"""
Based on the method of the same name in solve_disambiguation.py
"""
+ mysite = wikipedia.getSite()
+ linktrail = mysite.linktrail()
+
# make a backup of the original text so we can show the changes later
linkR = re.compile(r'\[\[(?P<title>[^\]\|#]*)(?P<section>#[^\]\|]*)?(\|(?P<label>[^\]]*))?\]\](?P<linktrail>' + linktrail + ')')
curpos = 0
@@ -79,7 +82,7 @@
if m.group('title') == '' or mysite.isInterwikiLink(m.group('title')):
continue
else:
- actualLinkPage = wikipedia.Page(page.site(), m.group('title'))
+ actualLinkPage = wikipedia.Page(targetPage.site(), m.group('title'))
# Check whether the link found is to page.
if actualLinkPage != linkedPage:
continue
@@ -147,7 +150,10 @@
text = treat(text, page2, target)
if text != page.get():
comment = wikipedia.translate(mysite, msg)
- page.put(text, comment)
+ try:
+ page.put(text, comment)
+ except (wikipedia.Error):
+ wikipedia.output('Error : unable to put %s' % page.aslink())
def main():
start = '!'