Revision: 5008
Author: wikipedian
Date: 2008-02-11 23:27:31 +0000 (Mon, 11 Feb 2008)
Log Message:
-----------
removed code that is obsolete since the colorization system was changed
Modified Paths:
--------------
trunk/pywikipedia/userinterfaces/terminal_interface.py
Modified: trunk/pywikipedia/userinterfaces/terminal_interface.py
===================================================================
--- trunk/pywikipedia/userinterfaces/terminal_interface.py 2008-02-11 18:00:40 UTC (rev 5007)
+++ trunk/pywikipedia/userinterfaces/terminal_interface.py 2008-02-11 23:27:31 UTC (rev 5008)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
#
# (C) Pywikipedia bot team, 2003-2007
#
@@ -176,11 +177,8 @@
# can't be represented in the console encoding.
codecedText = text.encode(config.console_encoding, 'replace').decode(config.console_encoding)
transliteratedText = ''
- # A transliteration replacement might be longer than the original
- # character, e.g. ? is transliterated to ch.
- # We need to reflect this growth in size by shifting the color list
- # entries. This variable counts how much the size has grown.
- sizeIncrease = 0
+ # Note: A transliteration replacement might be longer than the original
+ # character, e.g. ч is transliterated to ch.
prev = "-"
for i in xrange(len(codecedText)):
# work on characters that couldn't be encoded, but not on
@@ -196,7 +194,6 @@
transliteratedText += '\03{lightyellow}%s\03{default}' % transliterated
transLength = len(transliterated)
# memorize if we replaced a single letter by multiple letters.
- sizeIncrease += transLength - 1 + len('\03{lightyellow}\03{default}')
if len(transliterated) > 0:
prev = transliterated[-1]
else:
Bugs item #1887631, was opened at 2008-02-06 07:25
Message generated for change (Settings changed) made by wikipedian
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1887631&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: Fixed
Priority: 5
Private: No
Submitted By: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: All codes down by wikipedia.py
Initial Comment:
Traceback (most recent call last):
File "redirect.py", line 38, in <module>
import wikipedia, config
File "D:\My Documents\SOURCE\mwbot\pywikipedia\wikipedia.py", line 5528, in <m
odule>
writeToCommandLogFile()
File "D:\My Documents\SOURCE\mwbot\pywikipedia\wikipedia.py", line 5507, in wr
iteToCommandLogFile
s = u' '.join(args)
TypeError: sequence item 0: expected string or Unicode, NoneType found
OS:WinXP SP2
----------------------------------------------------------------------
Comment By: Russell Blau (russblau)
Date: 2008-02-06 15:12
Message:
Logged In: YES
user_id=855050
Originator: NO
Fixed in r4983; this bug was introduced by r4980
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1887631&group_…
Hi
Sorry if this is a stupid question, but I'm trying to create some
formatted content using the pywikimedia library.
The problem is that many formatting constructs expect to be on their
own line, i.e table. I try something like:
page = wi.Page(wi.getSite(), "title")
page.put("{|| col1 | col2 |}")
This doesn't turn out. It seems I need to have some kind of newline
delimiter between some of the characters.
I need to create the following for it to work, but I can only do it
manually using the normal web based MediaWiki article editor:
{|
| col1
| col2
|}
Translating this to "code" and attempting to print a "\n" only comes
out as normal text, so
page.put("{|\n| col1 \n| col2\n|}")
doesn't work
<br/> doesn't do the trick either.
What is the character I need to create a new line that will help me
format the content properly?
Hope this makes sense.
Regards
Lee Francis
PS Is there any way to split this list in two? The discussion is
drowning in patches and fixes and is sometimes difficult to read. Just
a thought...
--
_____
In theory, there is no difference between theory and practice. But, in
practice, there is.
-- Jan L.A. van de Snepscheut
Bugs item #1891060, was opened at 2008-02-11 10:35
Message generated for change (Comment added) made by purodha
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1891060&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: Fixed
Priority: 5
Private: No
Submitted By: Purodha B Blissenbach (purodha)
Assigned to: Nobody/Anonymous (nobody)
Summary: namespace['mul'][100] in various Wikipedias
Initial Comment:
I am getting currently excessive:
WARNING: Family file wikipedia includes namespace['mul'][100], but it should be removed (namespace doesn't exist in the site)
for various Wikipedias when running interwiki.py. I cannot believe that two dozen sites removed their NS 100's at once. So I believe in a bug.
----------------------------------------------------------------------
>Comment By: Purodha B Blissenbach (purodha)
Date: 2008-02-11 18:58
Message:
Logged In: YES
user_id=46450
Originator: YES
If so, they must also take care of moving the old pseudo-portal pages,
since otherwise they'll become inaccessible to normal editors.
If you send them a list, add [[w:ksh:Pooz:...]], please, which is not
among the ones I've seen in the messages. It's the local pseudo-portal NS @
kshwiki.
----------------------------------------------------------------------
Comment By: Daniel Herding (wikipedian)
Date: 2008-02-11 18:42
Message:
Logged In: YES
user_id=880694
Originator: NO
I think we should just ask the Wikimedia devs to add the missing portal
namespaces.
----------------------------------------------------------------------
Comment By: Purodha B Blissenbach (purodha)
Date: 2008-02-11 18:40
Message:
Logged In: YES
user_id=46450
Originator: YES
Probably, this could be an occasion to ask communities to ask for 'real'
namespaces for their portal pages? Is it worthwile the
developer/db-admin/server admin labour? Many wikis have only few such
pages, afaik.
Alternatively, I agree, the pseudo NS could be specialcased, as rotemliss
suggests.
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-02-11 17:55
Message:
Logged In: YES
user_id=1327030
Originator: NO
The problem shouldn't be treated this way, as the namespaces don't exist,
and treating them as though they are exist may cause other bugs (e.g.
treating the talk pages). I suggest to maintain a list of such
pseudo-namespaces, either in interwiki.py or in the family file, and use
them in interwiki.py.
----------------------------------------------------------------------
Comment By: Alleborgo (alleborgo)
Date: 2008-02-11 17:33
Message:
Logged In: YES
user_id=1898409
Originator: NO
Yes, now there are many warning messages but interwiki on the portals
pages are correct propagated. If we rollback to the previous version we'll
remove the warning message but we'll obtain the namespace mismatch message
and the script will not work on portal pages.
Maybe the best solution is to suggest to set those name as the namespace
100 which they are, doesn't?
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-02-11 13:55
Message:
Logged In: YES
user_id=1327030
Originator: NO
If the namespace is not defined in MediaWiki as such, it should not be
defined in pywikipediabot. If it is defined, it appears in Special:Export.
Thus, the pseudo-namespaces should be removed from the family file.
----------------------------------------------------------------------
Comment By: Purodha B Blissenbach (purodha)
Date: 2008-02-11 13:08
Message:
Logged In: YES
user_id=46450
Originator: YES
Ah, ok, the problem is from the other side, then. Now I believe, when
interwiki.py reads the xml output from the wikis that it gets sets of pages
from, that it either does not recognize NS 100+ in the XML, or the XML does
not include them in the header.
I've inspected my user page data exported via
http://br.wikipedia.org/wiki/Dibar:Export and found that, it mentiones NS
up to 15, but no more. The br Wikipedia is one of those displaying the
message, but http://br.wikipedia.org/wiki/Dibar:Allpages also only shows 15
NS.
Now, I am lost. Could it be that, you mistook some "Portal:somename" as
extra name spaces that actually are part of NS 0, the article name space,
while these names look like an extra namespace?
----------------------------------------------------------------------
Comment By: Alleborgo (alleborgo)
Date: 2008-02-11 10:45
Message:
Logged In: YES
user_id=1898409
Originator: NO
It's not a bug. I have manually inserted 22 namespace translations for
"Portal" which are "de facto" used in those languages. Actually I don't
know where is the problem but, yes, the bot understand those portal
namespace translations as wrong. But they're right ;)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1891060&group_…
Bugs item #1891060, was opened at 2008-02-11 11:35
Message generated for change (Comment added) made by wikipedian
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1891060&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: Fixed
Priority: 5
Private: No
Submitted By: Purodha B Blissenbach (purodha)
Assigned to: Nobody/Anonymous (nobody)
Summary: namespace['mul'][100] in various Wikipedias
Initial Comment:
I am getting currently excessive:
WARNING: Family file wikipedia includes namespace['mul'][100], but it should be removed (namespace doesn't exist in the site)
for various Wikipedias when running interwiki.py. I cannot believe that two dozen sites removed their NS 100's at once. So I believe in a bug.
----------------------------------------------------------------------
>Comment By: Daniel Herding (wikipedian)
Date: 2008-02-11 19:42
Message:
Logged In: YES
user_id=880694
Originator: NO
I think we should just ask the Wikimedia devs to add the missing portal
namespaces.
----------------------------------------------------------------------
Comment By: Purodha B Blissenbach (purodha)
Date: 2008-02-11 19:40
Message:
Logged In: YES
user_id=46450
Originator: YES
Probably, this could be an occasion to ask communities to ask for 'real'
namespaces for their portal pages? Is it worthwile the
developer/db-admin/server admin labour? Many wikis have only few such
pages, afaik.
Alternatively, I agree, the pseudo NS could be specialcased, as rotemliss
suggests.
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-02-11 18:55
Message:
Logged In: YES
user_id=1327030
Originator: NO
The problem shouldn't be treated this way, as the namespaces don't exist,
and treating them as though they are exist may cause other bugs (e.g.
treating the talk pages). I suggest to maintain a list of such
pseudo-namespaces, either in interwiki.py or in the family file, and use
them in interwiki.py.
----------------------------------------------------------------------
Comment By: Alleborgo (alleborgo)
Date: 2008-02-11 18:33
Message:
Logged In: YES
user_id=1898409
Originator: NO
Yes, now there are many warning messages but interwiki on the portals
pages are correct propagated. If we rollback to the previous version we'll
remove the warning message but we'll obtain the namespace mismatch message
and the script will not work on portal pages.
Maybe the best solution is to suggest to set those name as the namespace
100 which they are, doesn't?
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-02-11 14:55
Message:
Logged In: YES
user_id=1327030
Originator: NO
If the namespace is not defined in MediaWiki as such, it should not be
defined in pywikipediabot. If it is defined, it appears in Special:Export.
Thus, the pseudo-namespaces should be removed from the family file.
----------------------------------------------------------------------
Comment By: Purodha B Blissenbach (purodha)
Date: 2008-02-11 14:08
Message:
Logged In: YES
user_id=46450
Originator: YES
Ah, ok, the problem is from the other side, then. Now I believe, when
interwiki.py reads the xml output from the wikis that it gets sets of pages
from, that it either does not recognize NS 100+ in the XML, or the XML does
not include them in the header.
I've inspected my user page data exported via
http://br.wikipedia.org/wiki/Dibar:Export and found that, it mentiones NS
up to 15, but no more. The br Wikipedia is one of those displaying the
message, but http://br.wikipedia.org/wiki/Dibar:Allpages also only shows 15
NS.
Now, I am lost. Could it be that, you mistook some "Portal:somename" as
extra name spaces that actually are part of NS 0, the article name space,
while these names look like an extra namespace?
----------------------------------------------------------------------
Comment By: Alleborgo (alleborgo)
Date: 2008-02-11 11:45
Message:
Logged In: YES
user_id=1898409
Originator: NO
It's not a bug. I have manually inserted 22 namespace translations for
"Portal" which are "de facto" used in those languages. Actually I don't
know where is the problem but, yes, the bot understand those portal
namespace translations as wrong. But they're right ;)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1891060&group_…
Bugs item #1891060, was opened at 2008-02-11 10:35
Message generated for change (Comment added) made by purodha
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1891060&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: Fixed
Priority: 5
Private: No
Submitted By: Purodha B Blissenbach (purodha)
Assigned to: Nobody/Anonymous (nobody)
Summary: namespace['mul'][100] in various Wikipedias
Initial Comment:
I am getting currently excessive:
WARNING: Family file wikipedia includes namespace['mul'][100], but it should be removed (namespace doesn't exist in the site)
for various Wikipedias when running interwiki.py. I cannot believe that two dozen sites removed their NS 100's at once. So I believe in a bug.
----------------------------------------------------------------------
>Comment By: Purodha B Blissenbach (purodha)
Date: 2008-02-11 18:40
Message:
Logged In: YES
user_id=46450
Originator: YES
Probably, this could be an occasion to ask communities to ask for 'real'
namespaces for their portal pages? Is it worthwile the
developer/db-admin/server admin labour? Many wikis have only few such
pages, afaik.
Alternatively, I agree, the pseudo NS could be specialcased, as rotemliss
suggests.
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-02-11 17:55
Message:
Logged In: YES
user_id=1327030
Originator: NO
The problem shouldn't be treated this way, as the namespaces don't exist,
and treating them as though they are exist may cause other bugs (e.g.
treating the talk pages). I suggest to maintain a list of such
pseudo-namespaces, either in interwiki.py or in the family file, and use
them in interwiki.py.
----------------------------------------------------------------------
Comment By: Alleborgo (alleborgo)
Date: 2008-02-11 17:33
Message:
Logged In: YES
user_id=1898409
Originator: NO
Yes, now there are many warning messages but interwiki on the portals
pages are correct propagated. If we rollback to the previous version we'll
remove the warning message but we'll obtain the namespace mismatch message
and the script will not work on portal pages.
Maybe the best solution is to suggest to set those name as the namespace
100 which they are, doesn't?
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-02-11 13:55
Message:
Logged In: YES
user_id=1327030
Originator: NO
If the namespace is not defined in MediaWiki as such, it should not be
defined in pywikipediabot. If it is defined, it appears in Special:Export.
Thus, the pseudo-namespaces should be removed from the family file.
----------------------------------------------------------------------
Comment By: Purodha B Blissenbach (purodha)
Date: 2008-02-11 13:08
Message:
Logged In: YES
user_id=46450
Originator: YES
Ah, ok, the problem is from the other side, then. Now I believe, when
interwiki.py reads the xml output from the wikis that it gets sets of pages
from, that it either does not recognize NS 100+ in the XML, or the XML does
not include them in the header.
I've inspected my user page data exported via
http://br.wikipedia.org/wiki/Dibar:Export and found that, it mentiones NS
up to 15, but no more. The br Wikipedia is one of those displaying the
message, but http://br.wikipedia.org/wiki/Dibar:Allpages also only shows 15
NS.
Now, I am lost. Could it be that, you mistook some "Portal:somename" as
extra name spaces that actually are part of NS 0, the article name space,
while these names look like an extra namespace?
----------------------------------------------------------------------
Comment By: Alleborgo (alleborgo)
Date: 2008-02-11 10:45
Message:
Logged In: YES
user_id=1898409
Originator: NO
It's not a bug. I have manually inserted 22 namespace translations for
"Portal" which are "de facto" used in those languages. Actually I don't
know where is the problem but, yes, the bot understand those portal
namespace translations as wrong. But they're right ;)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1891060&group_…
Bugs item #1891190, was opened at 2008-02-11 17:04
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1891190&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: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Nightshadow28 (nightshadow28)
Assigned to: Nobody/Anonymous (nobody)
Summary: Requesting localization of blockpageschecker for jawp.
Initial Comment:
from Japanese Wikipedia:
templateToRemove = {
'ja':[ur'\{\{(?:[Tt]emplate:|)(?:半|移動|移動半|)保護(?:[Ss]|)(?:\|.+|)\}\}(\n+?|)'],
templateSemiProtection = {
'ja':[ur'\{\{(?:[Tt]emplate:|)半保護(?:[Ss]|)(?:\|.+|)\}\}(\n+?|)'],
templateTotalProtection = {
'ja':[ur'\{\{(?:[Tt]emplate:|)保護(?:[Ss]|)(?:\|.+|)\}\}(\n+?|)'],
templateSemiMoveProtection = {
'ja':[ur'\{\{(?:[Tt]emplate:|)移動半保護(?:[Ss]|)(?:\|.+|)\}\}(\n+?|)'],
templateTotalMoveProtection = {
'ja':[ur'\{\{(?:[Tt]emplate:|)移動保護(?:[Ss]|)(?:\|.+|)\}\}(\n+?|)'],
templateNoRegex = {
'ja':[u'{{半保護}}', u'{{保護}}', u'{{移動半保護}}', '{{移動保護}}'],
If you can not recieve above-mentioned Japanese character, I will write it into Botwiki's talk page. Thanks.
----------------------------------------------------------------------
>Comment By: Rotem Liss (rotemliss)
Date: 2008-02-11 20:01
Message:
Logged In: YES
user_id=1327030
Originator: NO
Applied in r5007.
----------------------------------------------------------------------
Comment By: Alex S.H. Lin (lin4h)
Date: 2008-02-11 19:20
Message:
Logged In: YES
user_id=1902991
Originator: NO
I made a patch file in bug 1891296 and fix zh locale info
----------------------------------------------------------------------
Comment By: Nightshadow28 (nightshadow28)
Date: 2008-02-11 17:08
Message:
Logged In: YES
user_id=1971526
Originator: YES
Sorry, I forgot a 'u' in the list.
templateNoRegex = {
'ja':[u'{{半保護}}', u'{{保護}}', u'{{移動半保護}}',
u'{{移動保護}}'],
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1891190&group_…
Bugs item #1891296, was opened at 2008-02-11 19:18
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1891296&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: 5
Private: No
Submitted By: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: bug 1891190's patch and fix zh locale
Initial Comment:
as title.
----------------------------------------------------------------------
>Comment By: Rotem Liss (rotemliss)
Date: 2008-02-11 20:00
Message:
Logged In: YES
user_id=1327030
Originator: NO
Applied in r5007.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1891296&group_…