Patches item #1844775, was opened at 2007-12-05 14:12
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1844775&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: refcheck.py's patch
Initial Comment:
It's like a stupid error....
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2007-12-09 16:01
Message:
Logged In: YES
user_id=1327030
Originator: NO
Fixed in r4660.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1844775&group_…
Bugs item #1844339, was opened at 2007-12-04 22:07
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1844339&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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: putPage AttributeError by using authenticate
Initial Comment:
AttributeError: 'dict' object has no attribute 'append'
This Error occurs in Function putPage of class Page in wikipedia.py.
Near:
if self.site().hostname() in config.authenticate.keys():
Adding values to "predata" fails with append() because it's a dictionary.
predata.append(("Content-type","application/x-www-form-urlencoded"))
predata.append(("User-agent", useragent))
using:
predata["Content-type"] = "application/x-www-form-urlencoded"
predata["User-agent"] = useragent
instead works fine.
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2007-12-09 15:59
Message:
Logged In: YES
user_id=1327030
Originator: NO
Fixed in r4659.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1844339&group_…
Feature Requests item #1844225, was opened at 2007-12-04 19:17
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1844225&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
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Clean Sandbox's talkpage
Initial Comment:
Hello! Some wikis (like English Wikipedia, Arabic Wikipedia etc..) use Sandbox's talkpage (or other pages) for sandboxing. I think we can't add more than one sandbox in clean_sandbox.py. can someone fix this problem?
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2007-12-09 15:55
Message:
Logged In: YES
user_id=1327030
Originator: NO
Fixed in r4658. They can now be added as a list:
[u'Page', u'Page2']
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1844225&group_…
Revision: 4658
Author: rotem
Date: 2007-12-09 13:54:30 +0000 (Sun, 09 Dec 2007)
Log Message:
-----------
(feature request 1844225) Make it possible to add a list of pages to sandboxTitle.
Modified Paths:
--------------
trunk/pywikipedia/clean_sandbox.py
Modified: trunk/pywikipedia/clean_sandbox.py
===================================================================
--- trunk/pywikipedia/clean_sandbox.py 2007-12-09 13:46:39 UTC (rev 4657)
+++ trunk/pywikipedia/clean_sandbox.py 2007-12-09 13:54:30 UTC (rev 4658)
@@ -28,7 +28,7 @@
'ar': u'{{من فضلك اترك هذا السطر ولا تعدله (عنوان ساحة اللعب)}}\n<!-- مرحبا! خذ راحتك في تجربة مهارتك في التنسيق والتحرير أسفل هذا السطر. هذه الصفحة لتجارب التعديل ، سيتم تفريغ هذه الصفحة كل 6 ساعات. -->',
'de': u'{{Bitte erst NACH dieser Zeile schreiben! (Begrüßungskasten)}}\r\n',
'en': u'{{Please leave this line alone (sandbox heading)}}\n <!-- Hello! Feel free to try your formatting and editing skills below this line. As this page is for editing experiments, this page will automatically be cleaned every 12 hours. -->',
- 'he': u'{{ארגז חול}}\n<!-- נא לא למחוק שורה זו ולא למחוק את השורה שמעליה – אנא כתבו רק מתחת לשורה זו. -->',
+ 'he': u'{{ארגז חול}}\n<!-- נא לערוך מתחת לשורה זו בלבד, תודה. -->',
'it': u'{{sandbox}} <!-- Scrivi SOTTO questa riga senza cancellarla. Grazie. -->',
'ja': u'{{subst:サンドボックス}}',
'ko': u'{{연습장 안내문}}',
@@ -81,17 +81,22 @@
while True:
now = time.strftime("%d %b %Y %H:%M:%S (UTC)", time.gmtime())
localSandboxTitle = wikipedia.translate(mySite, sandboxTitle)
- sandboxPage = wikipedia.Page(mySite, localSandboxTitle)
- try:
- text = sandboxPage.get()
- translatedContent = wikipedia.translate(mySite, content)
- if text.strip() == translatedContent.strip():
- wikipedia.output(u'The sandbox is still clean, no change necessary.')
- else:
- translatedMsg = wikipedia.translate(mySite, msg)
- sandboxPage.put(translatedContent, translatedMsg)
- except wikipedia.EditConflict:
- wikipedia.output(u'*** Loading again because of edit conflict.\n')
+ if type(localSandboxTitle) is list:
+ titles = localSandboxTitle
+ else:
+ titles = [localSandboxTitle,]
+ for title in titles:
+ sandboxPage = wikipedia.Page(mySite, localSandboxTitle)
+ try:
+ text = sandboxPage.get()
+ translatedContent = wikipedia.translate(mySite, content)
+ if text.strip() == translatedContent.strip():
+ wikipedia.output(u'The sandbox is still clean, no change necessary.')
+ else:
+ translatedMsg = wikipedia.translate(mySite, msg)
+ sandboxPage.put(translatedContent, translatedMsg)
+ except wikipedia.EditConflict:
+ wikipedia.output(u'*** Loading again because of edit conflict.\n')
if self.no_repeat:
wikipedia.output(u'\nDone.')
wikipedia.stopme()
Patches item #1843789, was opened at 2007-12-04 04:20
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1843789&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: Pietro Battiston (toobaz)
Assigned to: Nobody/Anonymous (nobody)
Summary: making image.py work
Initial Comment:
The following command:
python image.py pippo.png
gives the following output:
Checked for running processes. 1 processes currently running, including the
current process.
'Page' object has no attribute 'usingPages'
The problem is that oldImagePage is an instance of wikipedia.Page instead
of wikipedia.ImagePage.
I attach a very simple patch that fixes it. Then, everything works.
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2007-12-09 15:39
Message:
Logged In: YES
user_id=1327030
Originator: NO
This is duplicate to bug 1843759. I fixed it.
----------------------------------------------------------------------
Comment By: Pietro Battiston (toobaz)
Date: 2007-12-08 13:37
Message:
Logged In: YES
user_id=1553460
Originator: YES
Sorry, the original summary was totally wrong. The problem is in image.py,
not replace.py
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1843789&group_…
Patches item #1843787, was opened at 2007-12-04 04:18
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1843787&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: Pietro Battiston (toobaz)
Assigned to: Nobody/Anonymous (nobody)
Summary: catlib _getContentsAndSupercats performance issue
Initial Comment:
catlib.py's _getContentsAndSupercats method has a performance issue that in
some cases can slow a lot the process of recursiverly downloading all pages
or subcategories of a category.
See this example (chosen just because it's short to report, not because
it's so pathological):
###########ipython output###############
In [1]: import catlib
Checked for running processes. 1 processes currently running, including the
current process.
In [2]: len(catlib.Category('it', 'Categoria:Geometria
descrittiva').articlesList(recurse=True))
Getting [[Categoria:Geometria descrittiva]]...
Getting [[Categoria:Coperture a volta]]...
Getting [[Categoria:Corrispondenza biunivoca (geometria descrittiva)]]...
Getting [[Categoria:Curve piane]]...
Getting [[Categoria:Curve tridimensionali]]...
Getting [[Categoria:Glossario (geometria descrittiva)]]...
Getting [[Categoria:Metodi di rappresentazione]]...
Getting [[Categoria:Modellazione geometrica]]...
Getting [[Categoria:Tassellazioni]]...
Getting [[Categoria:Poliedri]]...
Getting [[Categoria:Tassellazioni]]...
Getting [[Categoria:Problemi di misura]]...
Getting [[Categoria:Stub geometria descrittiva]]...
Getting [[Categoria:Superfici]]...
Getting [[Categoria:Sviluppo di solidi]]...
Getting [[Categoria:Tangenza]]...
Out[2]: 393
###########end ipython output###############
As you can see, [[Categoria:Tassellazioni]] is downloaded 2 times. But I
can grant you that there are a lot of much worse cases.
Anyway, I'm attaching a patch. After the patch, here are the same
commands:
###########ipython output###############
In [1]: import catlib
Checked for running processes. 1 processes currently running, including the
current process.
In [2]: len(catlib.Category('it', 'Categoria:Geometria
descrittiva').articlesList(recurse=True))
Getting [[Categoria:Geometria descrittiva]]...
Getting [[Categoria:Coperture a volta]]...
Getting [[Categoria:Corrispondenza biunivoca (geometria descrittiva)]]...
Getting [[Categoria:Curve piane]]...
Getting [[Categoria:Curve tridimensionali]]...
Getting [[Categoria:Glossario (geometria descrittiva)]]...
Getting [[Categoria:Metodi di rappresentazione]]...
Getting [[Categoria:Modellazione geometrica]]...
Getting [[Categoria:Tassellazioni]]...
Getting [[Categoria:Poliedri]]...
Getting [[Categoria:Problemi di misura]]...
Getting [[Categoria:Stub geometria descrittiva]]...
Getting [[Categoria:Superfici]]...
Getting [[Categoria:Sviluppo di solidi]]...
Getting [[Categoria:Tangenza]]...
Out[2]: 393
###########end ipython output###############
Notice this patch also solves the problem of eventual loops in categories:
catlib won't loop.
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2007-12-09 15:37
Message:
Logged In: YES
user_id=1327030
Originator: NO
I changed the patch so that it solves also the problem of duplicate
returns, and also does add the subcategory to its cache, and applied it in
r4656.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1843787&group_…