Bugs item #1986295, was opened at 2008-06-06 13:18
Message generated for change (Comment added) made by melancholie
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1986295&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: 7
Private: No
Submitted By: Melancholie (melancholie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Check wgUserName on edit to look if bot is logged in
Initial Comment:
Check wgUserName on edit to look if bot is logged in!
If var wgUserName = null; the bot would edit as IP. But with this checked, the bot is prevented from doing so!
----------------------------------------------------------------------
>Comment By: Melancholie (melancholie)
Date: 2008-06-07 18:38
Message:
Logged In: YES
user_id=2089773
Originator: YES
Yes, assertion would be nice!
But it seems to not work, yet. This is shown to me when logged in as bot:
<h1>Assert failed</h1>
The specified assertion (<user/bot>) failed.
----------------------------------------------------------------------
Comment By: Bryan (btongminh)
Date: 2008-06-07 11:32
Message:
Logged In: YES
user_id=1806226
Originator: NO
There is AssertEdit for this. We should be able to simply add assert=user
in the query string.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1986295&group_…
Bugs item #1987463, was opened at 2008-06-07 15:41
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=1987463&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: Nightshadow28 (nightshadow28)
Assigned to: Nobody/Anonymous (nobody)
Summary: editarticle.py aborts in in gui.py / +ja message
Initial Comment:
* editarticle aborts in gui.py. (r5519, Python 2.5, ubuntu 8.04)
John_doe@Hogehoge:~/pywikipedia_r5519$ python editarticle.py
Checked for running processes. 1 processes currently running, including the current process.
Page to edit: User:Tatsujin28/Sandbox
Traceback (most recent call last):
File "editarticle.py", line 186, in <module>
main()
File "editarticle.py", line 182, in main
app.run()
File "editarticle.py", line 168, in run
new = textEditor.edit(old)
File "editarticle.py", line 120, in edit
return self.restoreLinebreaks(wikipedia.ui.editText(text, jumpIndex = jumpIndex, highlight = highlight))
File "/home/John_doe/pywikipedia_r5519/userinterfaces/terminal_interface.py", line 281, in editText
editor = gui.EditBoxWindow()
File "/home/John_doe/pywikipedia_r5519/gui.py", line 255, in __init__
menubar = Menu(root)
NameError: global name 'root' is not defined
John_doe@Hogehoge:~/pywikipedia_r5519$
* And... I added Japanese language message for the bot (attached). If anyone has a time, please commit it. Its summary is below:
-----
msg = {
'ar': u'تعديل يدوي: %s',
'de': u'Manuelle Bearbeitung: %s',
'en': u'Manual edit: %s',
'he': u'עריכה ידנית: %s',
'ja': u'手動編集: %s',
'pt': u'Editando manualmente com bot: %s',
'sv': u'Manuell redigering: %s',
'is': u'Handvirk breyting: %s',
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1987463&group_…
Bugs item #1987372, was opened at 2008-06-07 13:30
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=1987372&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: Bernhard Mayr (falk_steinhauer)
Assigned to: Nobody/Anonymous (nobody)
Summary: Crash within gui.py and corresponding bugfix
Initial Comment:
Line 418 of gui.py ( root = Tk() ) needs to be moved to line 24.
Otherwise line 255 ( menubar = Menu(root) ) will leed to a crash if gui.py is used in editarticle.py or replace.py.
TRACEBACK of replace.py crash when chosing [e]dit:
>>> Benutzer:FalkBot/Spielwiese <<<
- *<font color=darkorange>[[Ork]]</font>
+ *<font color=darkorange>[[Schwert]]</font>
Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in [b]rowser, [a
]ll, [q]uit) e
Traceback (most recent call last):
File "C:\Python\pywikipedia\replace.py", line 694, in <module>
main()
File "C:\Python\pywikipedia\replace.py", line 690, in main
bot.run()
File "C:\Python\pywikipedia\replace.py", line 390, in run
as_edited = editor.edit(original_text)
File "C:\Python\pywikipedia\editarticle.py", line 119, in edit
return self.restoreLinebreaks(wikipedia.ui.editText(text, jumpIndex = jumpIn
dex, highlight = highlight))
File "C:\Python\pywikipedia\userinterfaces\terminal_interface.py", line 281, i
n editText
editor = gui.EditBoxWindow()
File "C:\Python\pywikipedia\gui.py", line 255, in __init__
menubar = Menu(root)
NameError: global name 'root' is not defined
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1987372&group_…
Revision: 5519
Author: multichill
Date: 2008-06-07 13:03:28 +0000 (Sat, 07 Jun 2008)
Log Message:
-----------
*extra moveToCommonsTemplate for en
*added check if the image was actually uploaded before changing source image
*when image gets a new name at commons, replace all usage (using ImageRobot from image.py)
Modified Paths:
--------------
trunk/pywikipedia/imagecopy.py
Modified: trunk/pywikipedia/imagecopy.py
===================================================================
--- trunk/pywikipedia/imagecopy.py 2008-06-07 10:38:49 UTC (rev 5518)
+++ trunk/pywikipedia/imagecopy.py 2008-06-07 13:03:28 UTC (rev 5519)
@@ -58,9 +58,11 @@
succesfully on nl.wp (12k+ files copied and deleted locally) and en.wp
(about 100 files copied and SieBot has bot approval for tagging {{ncd}}
with this bot)
+** Implemented
* {{NowCommons|xxx}} requires the namespace prefix Image: on most wikis
and can be left out on others. This needs to be taken care of when
implementing i18n
+** Implemented
* This bot should probably get a small tutorial at meta with a few
screenshots.
"""
@@ -88,6 +90,7 @@
import wikipedia, config
import pagegenerators, add_text
from upload import *
+from image import *
NL=''
nowCommonsTemplate = {
@@ -199,7 +202,7 @@
moveToCommonsTemplate = {
'ar': [u'نقل إلى كومنز'],
- 'en': [u'Commons ok', u'Move to commons', u'Copy to Wikimedia Commons', u'To commons'],
+ 'en': [u'Commons ok', u'Copy to Wikimedia Commons', u'Move to commons', u'Movetocommons', u'To commons'],
'fi':[u'Commonsiin'],
'fr':[u'Image pour Commons'],
'hsb':[u'Kopěruj do Wikimedia Commons'],
@@ -214,6 +217,12 @@
'zh':[u'Copy to Wikimedia Commons'],
}
+imageMoveMessage = {
+ '_default': u'[[:Image:%s|Image]] moved to [[:commons:Image:%s|commons]].',
+ 'en': u'[[:Image:%s|Image]] moved to [[:commons:Image:%s|commons]].',
+ 'nl': u'[[:Image:%s|Afbeelding]] is verplaatst naar [[:commons:Image:%s|commons]].',
+}
+
def pageTextPost(url,postinfo):
print url
m=re.search(ur'http://(.*?)(/.*)',url)
@@ -268,29 +277,41 @@
bot = UploadRobot(url=self.imagePage.fileUrl(), description=CH, useFilename=self.newname, keepFilename=True, verifyDescription=False, ignoreWarning = True, targetSite = wikipedia.getSite('commons', 'commons'))
bot.run()
- #Should maybe check if the image actually was uploaded
+ #Should check if the image actually was uploaded
+ if wikipedia.Page(wikipedia.getSite('commons', 'commons'), u'Image:' + self.newname.decode('utf-8')).exists():
+ #Get a fresh copy, force to get the page so we dont run into edit conflicts
+ imtxt=self.imagePage.get(force=True)
- #Get a fresh copy, force to get the page so we dont run into edit conflicts
- imtxt=self.imagePage.get(force=True)
+ #Remove the move to commons templates
+ if moveToCommonsTemplate.has_key(self.imagePage.site().language()):
+ for moveTemplate in moveToCommonsTemplate[self.imagePage.site().language()]:
+ imtxt = re.sub(u'(?i)\{\{' + moveTemplate + u'\}\}', u'', imtxt)
- #Remove the move to commons templates
- if moveToCommonsTemplate.has_key(self.imagePage.site().language()):
- for moveTemplate in moveToCommonsTemplate[self.imagePage.site().language()]:
- imtxt = re.sub(u'(?i)\{\{' + moveTemplate + u'\}\}', u'', imtxt)
+ #add {{NowCommons}}
+ if nowCommonsTemplate.has_key(self.imagePage.site().language()):
+ addTemplate = nowCommonsTemplate[self.imagePage.site().language()] % self.newname.decode('utf-8')
+ else:
+ addTemplate = nowCommonsTemplate['_default'] % self.newname.decode('utf-8')
- #add {{NowCommons}}
- if nowCommonsTemplate.has_key(self.imagePage.site().language()):
- addTemplate = nowCommonsTemplate[self.imagePage.site().language()] % self.newname.decode('utf-8')
- else:
- addTemplate = nowCommonsTemplate['_default'] % self.newname.decode('utf-8')
+ if nowCommonsMessage.has_key(self.imagePage.site().language()):
+ commentText = nowCommonsMessage[self.imagePage.site().language()]
+ else:
+ commentText = nowCommonsMessage['_default']
- if nowCommonsMessage.has_key(self.imagePage.site().language()):
- commentText = nowCommonsMessage[self.imagePage.site().language()]
- else:
- commentText = nowCommonsMessage['_default']
+ wikipedia.showDiff(self.imagePage.get(), imtxt+addTemplate)
+ self.imagePage.put(imtxt + addTemplate, comment = commentText)
- wikipedia.showDiff(self.imagePage.get(), imtxt+addTemplate)
- self.imagePage.put(imtxt + addTemplate, comment = commentText)
+ self.gen = pagegenerators.FileLinksGenerator(self.imagePage)
+ self.preloadingGen = pagegenerators.PreloadingGenerator(self.gen)
+
+ #If the image is uploaded under a different name, replace all instances
+ if self.imagePage.titleWithoutNamespace() != self.newname.decode('utf-8'):
+ if imageMoveMessage.has_key(self.imagePage.site().language()):
+ moveSummary = imageMoveMessage[self.imagePage.site().language()] % (self.imagePage.titleWithoutNamespace(), self.newname.decode('utf-8'))
+ else:
+ moveSummary = imageMoveMessage['_default'] % (self.imagePage.titleWithoutNamespace(), self.newname.decode('utf-8'))
+ imagebot = ImageRobot(generator = self.preloadingGen, oldImage = self.imagePage.titleWithoutNamespace(), newImage = self.newname.decode('utf-8'), summary = moveSummary, always = True, loose = True)
+ imagebot.run()
return
#-label ok skip view
Bugs item #1805771, was opened at 2007-10-01 18:21
Message generated for change (Comment added) made by a_engels
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1805771&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: André Malafaya Baptista (malafaya)
Assigned to: Nobody/Anonymous (nobody)
Summary: Interwiki bot not adding link to valid section
Initial Comment:
In article [[en:Lancia Musa]], the interwiki [[fr:Lancia Musa]] is in fact a redirect to a section within an article ([[fr:Fiat Idea et Lancia Musa#Lancia Musa]]). According to past behavior, the bot should add this link (to the section) to linke articles. In fact, what happens is that it tries to delete the fr interwiki from other articles. I think this may be a recent bug but I'm not sure. Can you please check it out? Thanks.
----------------------------------------------------------------------
>Comment By: Andre Engels (a_engels)
Date: 2008-06-07 13:56
Message:
Logged In: YES
user_id=843018
Originator: NO
This is (or was) caused by the French page using
=='''Lancia Musa'''==
as the section header. Because of the bold, the bot did not understand it
as being titled 'Lancia Musa'. I now removed the bold from the French page,
so for this page it should be working now.
----------------------------------------------------------------------
Comment By: André Malafaya Baptista (malafaya)
Date: 2007-11-01 18:31
Message:
Logged In: YES
user_id=1037345
Originator: YES
No news on this?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1805771&group_…
Bugs item #1805771, was opened at 2007-10-01 18:21
Message generated for change (Settings changed) made by cosoleto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1805771&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: André Malafaya Baptista (malafaya)
Assigned to: Nobody/Anonymous (nobody)
Summary: Interwiki bot not adding link to valid section
Initial Comment:
In article [[en:Lancia Musa]], the interwiki [[fr:Lancia Musa]] is in fact a redirect to a section within an article ([[fr:Fiat Idea et Lancia Musa#Lancia Musa]]). According to past behavior, the bot should add this link (to the section) to linke articles. In fact, what happens is that it tries to delete the fr interwiki from other articles. I think this may be a recent bug but I'm not sure. Can you please check it out? Thanks.
----------------------------------------------------------------------
Comment By: André Malafaya Baptista (malafaya)
Date: 2007-11-01 18:31
Message:
Logged In: YES
user_id=1037345
Originator: YES
No news on this?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1805771&group_…
Bugs item #1805771, was opened at 2007-10-01 18:21
Message generated for change (Settings changed) made by cosoleto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1805771&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: André Malafaya Baptista (malafaya)
Assigned to: Nobody/Anonymous (nobody)
Summary: Interwiki bot not adding link to valid section
Initial Comment:
In article [[en:Lancia Musa]], the interwiki [[fr:Lancia Musa]] is in fact a redirect to a section within an article ([[fr:Fiat Idea et Lancia Musa#Lancia Musa]]). According to past behavior, the bot should add this link (to the section) to linke articles. In fact, what happens is that it tries to delete the fr interwiki from other articles. I think this may be a recent bug but I'm not sure. Can you please check it out? Thanks.
----------------------------------------------------------------------
Comment By: André Malafaya Baptista (malafaya)
Date: 2007-11-01 18:31
Message:
Logged In: YES
user_id=1037345
Originator: YES
No news on this?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1805771&group_…