Patches item #3610772, was opened at 2013-04-13 13:51
Message generated for change (Tracker Item Submitted) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3610772&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: Merlijn S. van Deen (valhallasw)
Assigned to: Nobody/Anonymous (nobody)
Summary: _getUserDataOld call from low-level getUrl
Initial Comment:
From http://lists.wikimedia.org/pipermail/pywikipedia-l/2012-October/007585.html :
I just wanted to put() a simple page on a MediaWiki 1.16
instance, where I have to use screen scraping (use_api=False).
There is something strange however:
There is an API call invoked by _getBlocked:
/w/api.php?action=query&format=json&meta=userinfo&uiprop=blockinfo
Here's my backtrace:
File "pywikipedia/wikipedia.py", line 693, in get
expandtemplates = expandtemplates)
File "pywikipedia/wikipedia.py", line 743, in _getEditPage
return self._getEditPageOld(get_redirect, throttle, sysop, oldid, change_edit_time)
File "pywikipedia/wikipedia.py", line 854, in _getEditPageOld
text = self.site().getUrl(path, sysop = sysop)
File "pywikipedia/wikipedia.py", line 5881, in getUrl
self._getUserDataOld(text, sysop = sysop)
File "pywikipedia/wikipedia.py", line 6016, in _getUserDataOld
blocked = self._getBlock(sysop = sysop)
File "pywikipedia/wikipedia.py", line 5424, in _getBlock
data = query.GetData(params, self)
File "pywikipedia/query.py", line 146, in GetData
jsontext = site.getUrl( path, retry=True, sysop=sysop, data=data)
getUrl(), which is also called from API, seems always
to call _getUserDataOld(text) where text is ... API output
so it tries to do strange things on that and gives warnings
like
Note: this language does not allow global bots.
WARNING: Token not found on wikipedia:pl. You will not be able to edit any page.
which is nonsense since the analyzed text is not HTML - only API output.
If getUrl() is supposed to be a low-level call, why call _getUserDataOld()
there?
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/7461
has introduced this call there.
It's easily reproducable by this:
import wikipedia
import config
config.use_api = False
wikipedia.verbose = True
s = wikipedia.getSite("pl", "wikipedia")
p = wikipedia.Page(s, u"User:Saper")
c = p.get()
c += "<!-- test -->"
p.put(c, u"Testing wiki", botflag=False)
//Saper
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3610772&group_…
Patches item #3522917, was opened at 2012-05-01 22:23
Message generated for change (Comment added) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3522917&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: Jenith (yjenith)
Assigned to: Nobody/Anonymous (nobody)
Summary: Picasa copier upload script
Initial Comment:
A tool to do batch uploading of Google web album (Picasa) to Commons using Pywikipedia and Google data API.
----------------------------------------------------------------------
>Comment By: Merlijn S. van Deen (valhallasw)
Date: 2013-04-13 13:29
Message:
Basically, the code reuse has two issues. The first is a social/legal one:
you should not copy other people's work without attributing them. As such,
removing "# (C) Multichill, 2009, # (C) Pywikipedia team, 2009-2012" is
simply not done.
Secondly, copying code makes maintenance much more difficult. If a bug is
found in one function in flickrripper.py, someone will /also/ have to fix
that in this script. Re-use, don't copy!
> Not sure how to call flickrrriper.py functions as it is local to the
script
from flickrripper import Tkdialog, ...etc...
----------------------------------------------------------------------
Comment By: Jenith (yjenith)
Date: 2012-06-22 22:32
Message:
This is not the exact copy of the Flickrripper.py. You can compare the code
for the both. I have used the Flickrriper.py as template/reference or the
steps involved. But the Google Data API and other tweaks which are not
covered in Flickrriper is fully done by me. So nothing harm I say it is my
code.
We use the different library and the procedure in Picasacopier.py, may be
the file naming convention we can re-use. Not sure how to call
flickrrriper.py functions as it is local to the script
Fyi, panromiaviewer also follows the same. is it any wrong we use the
Creative Commons code and alter for our purpose and redistribute? Sure I
will attribute the author name in my code
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-06-22 14:06
Message:
Wait a second. I had not realized this before, but it's an almost 1-on-1
copy of flickrripper. Why have you copied the entire file instead of
re-using functions?
+ it's not really acceptable to claim the code is yours when it is not.
In any case, most comments below are also valid for flickrripper:
* I'm not sure about using TK. What is wrong with starting a web browser
with an URL? that also works for people who run pwb in a shell.
* The TK window is too large for on a netbook
* The script is hard-coded to use commons...
* The script gets the images twice!
----------------------------------------------------------------------
Comment By: Jenith (yjenith)
Date: 2012-05-03 21:02
Message:
Gdata API download is described in
http://www.mediawiki.org/wiki/Manual:Pywikipediabot/picasacopier.py
----------------------------------------------------------------------
Comment By: Jenith (yjenith)
Date: 2012-05-02 20:21
Message:
Thanks for your updates. Please find here is the comments incorporated.
* Used spaces for indentation.
* Removed possible commented-out code blocks.
* Moved the PIL import to the functions where it is required.
* showHelp is used.
* Online user Manual is created at
http://www.mediawiki.org/wiki/Manual:Pywikipediabot/picasacopi
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-05-02 13:11
Message:
Overall, I like your code very much. I have two comments:
- You mix tabs and spaces for indentation. Please use spaces exclusively
- There are a lot of commented-out code blocks. Please either remove them
or implement them
On xqt's question on the dependencies:
- PIL is only required if the Tk interface is used -> please move the
import to the functions where it is required, so that the bot can also be
used without it
- I think we should remove all dependencies (such as simplejson, but also
some http library in the rewrite) and switch to a virtualenv / pip based
system. I'm not sure how well that would work on windows, though...
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2012-05-01 23:11
Message:
Thanks for your source.
Hm, gdata and pil aren't part of the pwb package (yet). Where could the bot
owner get them?
You should use the pywikibot.showHelp() method to display the
documtentation. List and docufy all given options.
If the usage/Help is shown the additional outputs about uploads should be
omitted.
Greetings
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3522917&group_…
Support Requests item #3602096, was opened at 2013-01-25 04:13
Message generated for change (Comment added) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3602096&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: Анима (n-fran)
Assigned to: Nobody/Anonymous (nobody)
Summary: When it will start work archivebot.py and weblinkchecker.py?
Initial Comment:
1) archivebot.py
I put in the parameters
|algo = old(1d)
Several days have passed, but still appears
Processing 10 threads
There are only 0 Threads. Skipped
When it will be back up?
2) weblinkchecker.py
I set the parameter-day:1 several days have Passed, but the bot is doing nothing.
And the errors are gone. I think that the problem is not only in my family file, because the same error occurs when I run the bot in Russian Wikipedia.
http://pastebin.com/x1zQipmU
Thanks.
----------------------------------------------------------------------
>Comment By: Merlijn S. van Deen (valhallasw)
Date: 2013-04-13 12:56
Message:
The weblinkchecker problem is now a bug at
https://sourceforge.net/tracker/?group_id=93107&atid=603138
----------------------------------------------------------------------
Comment By: Анима (n-fran)
Date: 2013-04-04 01:58
Message:
After 3 months... What are my errors?
http://pastebin.ru/6u5etpBchttp://pastebin.com/BSkXmFaa
----------------------------------------------------------------------
Comment By: Анима (n-fran)
Date: 2013-01-25 04:15
Message:
Pywikipedia (r10976 (wikipedia.py), 2013/01/23, 21:32:04, OUTDATED)
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit
(Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3602096&group_…
Bugs item #3610770, was opened at 2013-04-13 12:55
Message generated for change (Tracker Item Submitted) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3610770&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: Merlijn S. van Deen (valhallasw)
Assigned to: Nobody/Anonymous (nobody)
Summary: weblinkchecker URL unicode problems
Initial Comment:
As reported by Anima in https://sourceforge.net/tracker/?func=detail&aid=3602096&group_id=93107&ati…
Weblinkchecker jumps through some strange unicode hoops. There is no such thing as a unicode URL - URLs are /always/ urlencoded UTF-8 strings, so:
>>> urllib.quote(u"ö".encode('utf-8'))
'%C3%B6'
anything else is *wrong*, including things like asking what encoding the web server uses: that is only relevant for decoding the page *text*.
Basic test case:
>>> import weblinkchecker
>>> lc = weblinkchecker.LinkChecker(u"http://svoya-igra.org/Райков Александр Вадимович/")
Contacting server svoya-igra.org to find out its default encoding...
Error retrieving server's default charset. Using ISO 8859-1.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "weblinkchecker.py", line 218, in __init__
self.changeUrl(url)
File "weblinkchecker.py", line 275, in changeUrl
self.path = unicode(urllib.quote(self.path.encode(encoding)))
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 1-6: ordinal not in range(256)
valhallasw@lisilwen:~/src/pywikipedia/trunk/pywikipedia$ python version.py
Pywikipedia [svn+ssh] valhallasw@trunk/pywikipedia (r11368, 2013/04/13, 08:16:45, ok)
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3610770&group_…
Bugs item #3610411, was opened at 2013-04-09 14:01
Message generated for change (Comment added) made by nu11zer0
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3610411&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: rewrite
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nullzer0 (nu11zer0)
Assigned to: Russell Blau (russblau)
Summary: a bug in the constructor of class Page
Initial Comment:
The constructor of class Page can create a copy of the input object. The output contains all informations of the old object except info of revisions because of this line: self._revisions = {}
After I got the new object from that method, I called page.get(). The result is that the bot doesn't try to obtain the content because it already has "_revid" and other attribites. So it executes this command: self._revisions[self._revid].text and got the error since self._revisions is a blank dict.
----
Pywikibot branches/rewrite/ (r11366, 2013/04/08, 21:38:06, ok)
Python 2.7.3 (default, Sep 26 2012, 21:53:58)
[GCC 4.7.2]
unicode test: ok
----------------------------------------------------------------------
>Comment By: Nullzer0 (nu11zer0)
Date: 2013-04-10 00:48
Message:
Sorry, I mistyped. I mean page.put(), not page.get(). Anyway I have sent
the patch for this bug at #3610442. :)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3610411&group_…
Patches item #3610442, was opened at 2013-04-10 00:35
Message generated for change (Tracker Item Submitted) made by nu11zer0
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3610442&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: rewrite
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nullzer0 (nu11zer0)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix a bug in the constructor of class Page + random bug
Initial Comment:
fix #3610411 + return status of changing category
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3610442&group_…
Bugs item #3610411, was opened at 2013-04-09 14:01
Message generated for change (Tracker Item Submitted) made by nu11zer0
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3610411&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: rewrite
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nullzer0 (nu11zer0)
Assigned to: Russell Blau (russblau)
Summary: a bug in the constructor of class Page
Initial Comment:
The constructor of class Page can create a copy of the input object. The output contains all informations of the old object except info of revisions because of this line: self._revisions = {}
After I got the new object from that method, I called page.get(). The result is that the bot doesn't try to obtain the content because it already has "_revid" and other attribites. So it executes this command: self._revisions[self._revid].text and got the error since self._revisions is a blank dict.
----
Pywikibot branches/rewrite/ (r11366, 2013/04/08, 21:38:06, ok)
Python 2.7.3 (default, Sep 26 2012, 21:53:58)
[GCC 4.7.2]
unicode test: ok
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3610411&group_…
Feature Requests item #3610291, was opened at 2013-04-08 00:53
Message generated for change (Settings changed) made by n-fran
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3610291&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: featured
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Анима (n-fran)
Assigned to: Nobody/Anonymous (nobody)
Summary: humantitle.py
Initial Comment:
Automatic number of redirects to articles about people.
On the English Wikipedia made natural naming of articles about personalities - Name Family Name Middle name. For example, the name of the article Albert Einstein and Einstein Albert - it redirects.
http://en.wikipedia.org/wiki/Albert_Einsteinhttp://en.wikipedia.org/w/index.php?title=Einstein,_Albert&redirect=no
In the Russian Wikipedia, called the article in a different way: Family name, Name Middle name. That is, the article is called Einstein, Albert but not Albert Einstein.
http://ru.wikipedia.org/wiki/%D0%AD%D0%B9%D0%BD%D1%88%D1%82%D0%B5%D0%B9%D0%…http://ru.wikipedia.org/w/index.php?title=%D0%90%D0%BB%D1%8C%D0%B1%D0%B5%D1…
But it is not forbidden to do redirects. I would like to bot that could do the redirection. This algorithmic task.
The bot must be in manual mode. If the bot sees an article, containing the title in the upper-case letters and commas - if the article is called A, B C - he will offer redirects to the article title - B C A B A and A, B in the case, if the articles B C A and B does not already exist. For example: if name of page is Lenin, Vladimir Ilyich bot will propose options for create redirects Vladimir Ilyich Lenin Vladimir Lenin and Lenin, Vladimir.
If the bot finds the title of the article more than one capital letter and it is called A B C it offers options for redirects C, A B C, A and A C in the case if such items are not already exist. . For example: if name of page is Dmitri Ivanovich Mendeleev bot will propose options for create redirects Mendeleev, Dmitri Ivanovich Mendeleev, Dmitri and Dmitri Mendeleev.
Accordingly, the bot should offer redirects, if the article is called A B or B, A.
If the redirect is already there and it leads not to the article, with which we are working at the moment, the bot should offer options:
1) create instead of the redirecting page disambiguation
2) to put in the beginning of the article, which leads the redirect template {{Redirect}} or supersede the templates in other wiki-projects.
http://en.wikipedia.org/wiki/Template:Redirect
In more detail I can explain in IRC. Thanks.
----------------------------------------------------------------------
Comment By: Анима (n-fran)
Date: 2013-04-09 04:15
Message:
For me has no value, to do a new script or to make changes in
capitalize_redirects.py. That it is better and simpler — to solve to
specialists programmers. However, capitalize_redirects.py does redirects
absolutely other plan. I don't know, whether it is possible to modify it
under that task which I offered. Thanks.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2013-04-08 13:15
Message:
We have no humantitle.py in the framework. Do you suggest to implement it?
Or do you want to join a given script to the framework? There is already a
script for creating redirects which could be modified:
capitalize_redirects.py.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3610291&group_…
Feature Requests item #3610391, was opened at 2013-04-09 09:41
Message generated for change (Tracker Item Submitted) made by n-fran
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3610391&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: Анима (n-fran)
Assigned to: Nobody/Anonymous (nobody)
Summary: To update external links for downloading in copyright.py
Initial Comment:
Links in http://www.mediawiki.org/wiki/Manual:Pywikipediabot/copyright.py and IDLE text of copyright.py are provided in a condition for 2006-2007. It is advisable to update them because a lot of things exchanged.
Also it would be desirable that the script was available to use in the Russian Wikipedia. Not KeyError: 'ru'. Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3610391&group_…