Hello pywikipedia-l :)
Just found that bizarre line, among the old r5020 commit (mostly some
unsignificant code cleanup)
Index: wikipedia.py
===================================================================
--- wikipedia.py (révision 5019)
+++ wikipedia.py (révision 5020)
# leading colon implies main namespace instead of the default
if t.startswith(':'):
t = t[1:]
self._namespace = 0
else:
self._namespace = defaultNamespace
+ if not t:
+ raise Error(u"Invalid title '%s'" % title )
+
+ self._namespace = defaultNamespace
Since then, a Page object has always the defaultNamespace namespace
(!), which is what caught my attention.
However, what's that semicolon test two lines before ? If a title
starts by ':', it's in the main namespace ? I'm not quite sure of
this...
--
Nicolas Dumazet — NicDumZ [ nIk.d̪ymz ]
Patches item #2005964, was opened at 2008-06-29 17:23
Message generated for change (Comment added) made by melancholie
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2005964&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: 6
Private: No
Submitted By: Melancholie (melancholie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Update/optimization of featured.py
Initial Comment:
1. added dsb summary
2. removed all namespace prefixes (else they just get obsolete with the time); using English standards in that patch (how to use module dicts?)...
Diff patch is attached ;-)
See also coloured diff:
http://als.wikipedia.org/w/index.php?title=Benutzer%3AMelancholieBot%2Ffeat…
----------------------------------------------------------------------
>Comment By: Melancholie (melancholie)
Date: 2008-07-04 16:08
Message:
Logged In: YES
user_id=2089773
Originator: YES
Updated zh-classical
File Added: featured.diff
----------------------------------------------------------------------
Comment By: Melancholie (melancholie)
Date: 2008-06-29 17:26
Message:
Logged In: YES
user_id=2089773
Originator: YES
Note: The uz template namespace has been changed for example...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2005964&group_…
Bugs item #2006208, was opened at 2008-06-29 23:58
Message generated for change (Comment added) made by melancholie
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2006208&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: 9
Private: No
Submitted By: Melancholie (melancholie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Undo decodeEsperantoX removal (r5563)
Initial Comment:
I do not know why siebrand had problems with decodeEsperantoX(),
see http://eo.wikipedia.org/w/index.php?title=Sunfloro&diff=1775705&oldid=15592… - but now I do have that problem (not with interwiki.py, but with featured.py and replace.py)!
See http://eo.wikipedia.org/w/index.php?title=Vitamino_C&diff=prev&oldid=1819462
Characters are replaced to gxx, sxx etc., making templates unusable etc...
As decodeEsperantoX() had been used for a very long time, please undo that change:
http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/wikipedia.py?…
----------------------------------------------------------------------
>Comment By: Melancholie (melancholie)
Date: 2008-07-04 15:05
Message:
Logged In: YES
user_id=2089773
Originator: YES
The problem seems to be that decodeEsperantoX() has been removed, but
encodeEsperantoX() remains.
So the encodeEsperantoX() parts currently produce 'xx'! Either revert the
SVN change, or also ?remove? encodeEsperantoX().
----------------------------------------------------------------------
Comment By: Melancholie (melancholie)
Date: 2008-06-30 00:19
Message:
Logged In: YES
user_id=2089773
Originator: YES
See also:
*
http://eo.wikipedia.org/wiki/Vikipedio:Diskutejo#.22Laboro.22_de_robotistoj
*
http://eo.wikipedia.org/w/index.php?title=Historio_de_Unui%C4%9Dinta_Re%C4%…
----------------------------------------------------------------------
Comment By: Melancholie (melancholie)
Date: 2008-06-30 00:00
Message:
Logged In: YES
user_id=2089773
Originator: YES
http://eo.wikipedia.org/wiki/Speciala:Contributions/Melancholie (r5558
works; r5639 is broken)!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2006208&group_…
Bugs item #2009437, was opened at 2008-07-03 07:46
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2009437&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: global name 'image' is not defined in Checkimages.py
Initial Comment:
Pywikipedia [http] trunk/pywikipedia (r5664, Jul 02 2008, 12:52:15)
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Checkimages.py, when script found images in commons, it will traceback the bugs.
White apollon.jpg is on commons!
Traceback (most recent call last):
File "D:\My Documents\SOURCE\pybot\trunk\pywikipedia\checkimages.py", line 133
6, in <module>
checkbot()
File "D:\My Documents\SOURCE\pybot\trunk\pywikipedia\checkimages.py", line 117
3, in checkbot
response = mainClass.checkImageOnCommons()
File "D:\My Documents\SOURCE\pybot\trunk\pywikipedia\checkimages.py", line 720
, in checkImageOnCommons
elif 'stemma' in image.lower() and self.site.lang == 'it':
NameError: global name 'image' is not defined.
----------------------------------------------------------------------
>Comment By: NicDumZ Nicolas Dumazet (nicdumz)
Date: 2008-07-04 00:33
Message:
Logged In: YES
user_id=1963242
Originator: NO
fixed in r5667 :)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2009437&group_…
Revision: 5667
Author: nicdumz
Date: 2008-07-03 22:32:37 +0000 (Thu, 03 Jul 2008)
Log Message:
-----------
image -> self.image
Modified Paths:
--------------
trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py
===================================================================
--- trunk/pywikipedia/checkimages.py 2008-07-03 19:18:50 UTC (rev 5666)
+++ trunk/pywikipedia/checkimages.py 2008-07-03 22:32:37 UTC (rev 5667)
@@ -717,7 +717,7 @@
# Problems? Yes! We have to skip the check part for that image!
# Because it's on commons but someone has added something on your project.
return False
- elif 'stemma' in image.lower() and self.site.lang == 'it':
+ elif 'stemma' in self.image.lower() and self.site.lang == 'it':
wikipedia.output(u'%s has "stemma" inside, means that it\'s ok.' % image)
return True # Problems? No, it's only not on commons but the image needs a check
else:
Revision: 5665
Author: jayvdb
Date: 2008-07-03 09:36:23 +0000 (Thu, 03 Jul 2008)
Log Message:
-----------
-filename to specific the name to upload as
Modified Paths:
--------------
trunk/pywikipedia/upload.py
Modified: trunk/pywikipedia/upload.py
===================================================================
--- trunk/pywikipedia/upload.py 2008-07-02 12:52:15 UTC (rev 5664)
+++ trunk/pywikipedia/upload.py 2008-07-03 09:36:23 UTC (rev 5665)
@@ -5,6 +5,7 @@
Arguments:
-keep Keep the filename as is
+ -filename Target filename
-noverify Do not ask for verification of the upload description if one is given
If any other arguments are given, the first is the URL or filename
@@ -298,6 +299,7 @@
url = u''
description = []
keepFilename = False
+ useFilename = None
verifyDescription = True
# call wikipedia.py function to process all global wikipedia args
@@ -308,6 +310,8 @@
if arg:
if arg.startswith('-keep'):
keepFilename = True
+ elif arg.startswith('-filename:'):
+ useFilename = arg[10:]
elif arg.startswith('-noverify'):
verifyDescription = False
elif url == u'':
@@ -315,7 +319,7 @@
else:
description.append(arg)
description = u' '.join(description)
- bot = UploadRobot(url, description=description, keepFilename=keepFilename, verifyDescription=verifyDescription)
+ bot = UploadRobot(url, description=description, useFilename=useFilename, keepFilename=keepFilename, verifyDescription=verifyDescription)
bot.run()
if __name__ == "__main__":
Bugs item #2009437, was opened at 2008-07-03 13:46
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=2009437&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: global name 'image' is not defined in Checkimages.py
Initial Comment:
Pywikipedia [http] trunk/pywikipedia (r5664, Jul 02 2008, 12:52:15)
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Checkimages.py, when script found images in commons, it will traceback the bugs.
White apollon.jpg is on commons!
Traceback (most recent call last):
File "D:\My Documents\SOURCE\pybot\trunk\pywikipedia\checkimages.py", line 133
6, in <module>
checkbot()
File "D:\My Documents\SOURCE\pybot\trunk\pywikipedia\checkimages.py", line 117
3, in checkbot
response = mainClass.checkImageOnCommons()
File "D:\My Documents\SOURCE\pybot\trunk\pywikipedia\checkimages.py", line 720
, in checkImageOnCommons
elif 'stemma' in image.lower() and self.site.lang == 'it':
NameError: global name 'image' is not defined.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2009437&group_…