gerritbot added a comment.
Change 297637 **merged** by jenkins-bot:
[pywikibot/core@master] Add wrapper function around wbparsevalue
https://gerrit.wikimedia.org/r/297637
TASK DETAIL
https://phabricator.wikimedia.org/T112140
EMAIL PREFERENCES
Multichill added a comment.
I might pick this up if nobody else beats me to it (go ahead). I actually
have been using this a lot in my bots and it works quite well.
TASK DETAIL
https://phabricator.wikimedia.org/T112140
EMAIL PREFERENCES
gerritbot added a comment.
Change 297637 had a related patch set uploaded (by Lokal Profil; owner: ArthurPSmith):
[pywikibot/core@master] Add wrapper function around wbparsevalue
https://gerrit.wikimedia.org/r/297637TASK DETAILhttps://phabricator.wikimedia.org/T112140EMAIL
Multichill added a comment.
Item:
*https://www.wikidata.org/w/api.php?action="">
Property:
https://www.wikidata.org/w/api.php?action="">
FilePage:
*https://www.wikidata.org/w/api.php?action="">
Checks if it exists so https://www.wikidata.org/w/api.php?action=""> gives an error
Coordinate:
ArthurPSmith added a comment.
@Multichill - could be, I'm not familiar with WbTime other than a glance at the code. Are there edge cases (eg. 10^20 years into the future?) that would break the "int/long" assumptions? But it definitely does NOT work for WbQuantity the way things currently are.
Multichill added a comment.
I don't get it. https://www.wikidata.org/w/api.php?action=""> output seems suitable to build a WbTime object. with https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/__init__.py;b6e933d4e33e1035457755015b29da74b8c8160a$512 . What's wrong with
ArthurPSmith added a comment.
>>! In T112140#2435122, @Multichill wrote:
The function should return an object. Possibilities seem to be commonsMedia, globe-coordinate, monolingualtext, quantity, string, time, url, external-id, wikibase-item, wikibase-property, math
The parse API allows a list of
Multichill added a comment.
In T112140#2429651, @ArthurPSmith wrote:
I'm going to have a shot at implementing this - it looks like it will be useful for a number of other open phabricator issues for pywikibot. I was figuring a function that will take all the parameters the API offers (datatype -
ArthurPSmith added a comment.
See https://gerrit.wikimedia.org/r/#/c/297637/ for proposed implementation...TASK DETAILhttps://phabricator.wikimedia.org/T112140EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: ArthurPSmithCc: Tobias1984, ArthurPSmith, Aklapper,