Bugs item #1948686, was opened at 2008-04-22 13:51
Message generated for change (Settings changed) made by wikipedian
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1948686&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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: disambig on kab wiki
Initial Comment:
It looks like {{asefham}} is the templete for disambig pages on the kab wiki as far as I can see it only used on three pages.
I can do the interwiki by hand or manual assisted, but the next bot could easy remove it again if it doesn't understand the langage spoken on Kab, could make the automatic wrong conclusion.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1948686&group_…
Bugs item #1934563, was opened at 2008-04-04 16:57
Message generated for change (Settings changed) made by wikipedian
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1934563&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: IWAI Masaharu (iwaim)
Assigned to: Nobody/Anonymous (nobody)
Summary: translate: update lang:ja summary for noreferences.py
Initial Comment:
Noreferences.py's summary for Japanese was like a machine translation. I update it. See the my patch.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1934563&group_…
Bugs item #1915362, was opened at 2008-03-16 11:54
Message generated for change (Comment added) made by wikipedian
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1915362&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: IOError in "category.py tree"
Initial Comment:
Line 748 of category.py must be changed from
if not os.path.isabs(filename):
to
if not os.path.isabs(filename) and filename:
Otherwise the call of "category.py tree" would lead to an IOError when the tree should be printed to stdout (see output below).
C:\Python\pywikipedia>category.py tree
Checked for running processes. 1 processes currently running, including the current process.
For which category do you want to create a tree view? inoffiziell
Please enter the name of the file where the tree should be saved, or press enter to simply show the tree:
Getting [[Kategorie:Inoffiziell]]...
Getting [[Kategorie:Alternatives Aventurien]]...
...and so on...
Getting [[Kategorie:Inoffizieller Index]]...
Saving results in C:\Python\pywikipedia
Dumping to category.dump.bz2, please wait...
Traceback (most recent call last):
File "C:\Python\pywikipedia\category.py", line 933, in <module>
bot.run()
File "C:\Python\pywikipedia\category.py", line 826, in run
f = codecs.open(self.filename, 'a', 'utf-8')
File "C:\Python\lib\codecs.py", line 817, in open
file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: 'C:\\Python\\pywikipedia'
Here you can see, that "filename" is the name of a folder, not a file. Opening a folder for writing is not possible.
----------------------------------------------------------------------
>Comment By: Daniel Herding (wikipedian)
Date: 2008-04-23 23:55
Message:
Logged In: YES
user_id=880694
Originator: NO
Without looking why the script crashes: is "category.py tree" really still
needed, now that MediaWiki can show such a tree itself via AJAX?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1915362&group_…
Bugs item #1949476, was opened at 2008-04-23 05:09
Message generated for change (Comment added) made by russblau
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1949476&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: NicDumZ — Nicolas Dumazet (nicdumz)
Assigned to: Nobody/Anonymous (nobody)
>Summary: PreloadingGenerator does not set editRestriction
Initial Comment:
I realized that sometimes, in blockpageschecker.py, someTotalProtectedPage.canBeEdited() would wrongly return True (I have no sysop account, hence on every [edit=sysop] protected page, it should return False)
I first tried the single canBeEdited() on that total protected page :
>>> import wikipedia; s = wikipedia.Site('fr', 'wikipedia'); protectedpage = wikipedia.Page(s, 'Zentrum')
Checked for running processes. 1 processes currently running, including the current process.
>>> protectedpage.canBeEdited()
Getting 1 pages from wikipedia:fr...
False
Which is fine.
However :
>>> import wikipedia; s = wikipedia.Site('fr', 'wikipedia'); protectedpage = wikipedia.Page(s, 'Zentrum')
Checked for running processes. 1 processes currently running, including the current process.
>>> import pagegenerators; gen = pagegenerators.PreloadingGenerator([protectedpage])
>>> for p in gen : print p.canBeEdited()
...
Getting 1 pages from wikipedia:fr...
True
>>> protectedpage.canBeEdited()
True
Which is wrong.
I then thought then calling canBeEdited on a total protected page from PreloadingGenerator would _every_time_ return wrongly True, but I was wrong :
>>> import wikipedia; s = wikipedia.Site('en', 'wikipedia'); protectedpage = wikipedia.Page(s, 'Wikipedia:site support')
Checked for running processes. 1 processes currently running, including the current process.
>>> import pagegenerators; gen = pagegenerators.PreloadingGenerator([protectedpage])
>>> for p in gen : print p.canBeEdited()
...
Getting 1 pages from wikipedia:en...
False
So apparently, in some special cases, calling canBeEdited on a total protected page from PreloadingGenerator returns True. However I have not been able to find *when* exactly this happens.
Any thoughts ?
PS : An easy fix for this is to get rid of the current implementation of canBeEdited, to use instead the new getRestrictions using the API (getRestrictions()['edit']). But we should find out what is happenning here, since we might miss something important.
----------------------------------------------------------------------
>Comment By: Russell Blau (russblau)
Date: 2008-04-23 10:47
Message:
Logged In: YES
user_id=855050
Originator: NO
The reason for this is that PreloadingGenerator calls wikipedia.getAll(),
which uses the wiki's [[Special:Export]] page to retrieve the page(s); the
data structure returned by [[Special:Export]] does not include the
protection status, so it is impossible to determine whether a preloaded
page is protected. The only way I can see to fix this within the existing
framework is to have canBeEdited() call self.get(force=True) instead of
just self.get(), but that would completely defeat the purpose of preloading
the pages. The other alternative is your suggestion of using the API, but
this would break backwards-compatibility for many wiki families, and I
think that is better addressed in the rewrite branch.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1949476&group_…
Revision: 5262
Author: wikipedian
Date: 2008-04-23 14:16:55 +0000 (Wed, 23 Apr 2008)
Log Message:
-----------
add a small anchor link to the edit comment
Modified Paths:
--------------
trunk/pywikipedia/weblinkchecker.py
Modified: trunk/pywikipedia/weblinkchecker.py
===================================================================
--- trunk/pywikipedia/weblinkchecker.py 2008-04-23 13:56:51 UTC (rev 5261)
+++ trunk/pywikipedia/weblinkchecker.py 2008-04-23 14:16:55 UTC (rev 5262)
@@ -140,7 +140,7 @@
'sr': u'== %s ==\n\nТоком неколико аутоматски провера, бот је пронашао покварене спољашње повезнице. Молимо вас проверите да ли је повезница добра, поправите је или је уклоните!\n\n%s\n%s--~~~~',
}
-talk_report_header = {
+talk_report_caption = {
'ar': u'وصلة ميتة',
'de': u'Toter Weblink',
'en': u'Dead link',
@@ -664,17 +664,18 @@
archiveMsg = wikipedia.translate(wikipedia.getSite(), talk_report_archive) % archiveURL
else:
archiveMsg = u''
- # The header will default to "Dead link". But if there is already such a header, we'll
+ # The caption will default to "Dead link". But if there is already such a caption, we'll
# use "Dead link 2", "Dead link 3", etc.
- header = wikipedia.translate(wikipedia.getSite(), talk_report_header)
+ caption = wikipedia.translate(wikipedia.getSite(), talk_report_caption)
i = 1
- # Check if there is already such a header on the talk page.
- while re.search('= *' + header + ' *=', content) is not None:
+ # Check if there is already such a caption on the talk page.
+ while re.search('= *' + caption + ' *=', content) is not None:
i += 1
- header = wikipedia.translate(wikipedia.getSite(), talk_report_header) + " " + str(i)
- content += wikipedia.translate(wikipedia.getSite(), talk_report) % (header, errorReport, archiveMsg)
+ caption = wikipedia.translate(wikipedia.getSite(), talk_report_caption) + " " + str(i)
+ content += wikipedia.translate(wikipedia.getSite(), talk_report) % (caption, errorReport, archiveMsg)
+ comment = u'[[%s#%s|→]]%s' % (talkPage.title(), caption, wikipedia.translate(wikipedia.getSite(), talk_report_msg))
try:
- talkPage.put(content)
+ talkPage.put(content, comment)
except wikipedia.SpamfilterError, error:
wikipedia.output(u'\03{lightaqua}** SpamfilterError while trying to change %s: %s\03{default}' % (talkPage.aslink(), error.url))
@@ -698,12 +699,9 @@
self.history = History(reportThread)
def run(self):
- comment = wikipedia.translate(wikipedia.getSite(), talk_report_msg)
- wikipedia.setAction(comment)
-
for page in self.generator:
self.checkLinksIn(page)
-
+
def checkLinksIn(self, page):
try:
text = page.get()