How about creating a wikibase.py file in the pywikibot/ directory to contain DataSite, WikibasePage, ItemPage, Claim, WbTime, WbQuantity, etc.?
On Jun 1, 2014 7:42 AM, "Ricordisamoa" ricordisamoa@openmailbox.org wrote:
How about creating a wikibase.py file in the pywikibot/ directory to
contain DataSite, WikibasePage, ItemPage, Claim, WbTime, WbQuantity, etc.?
Sounds good to me
I agree but one question: 1- Currently for defining an item we work this way [1] item = pywikibot.ItemPage.fromPage(page)
So Do you mean after the change we need to something like this?: item = pywikibot.wikibase.ItemPage.fromPage(page) or "from pywikibot import wikibase"
or It's just a backend change and no difference in frontend?
[1] https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Wikidata#Working_with_p...
Best
On 6/1/14, John Mark Vandenberg jayvdb@gmail.com wrote:
On Jun 1, 2014 7:42 AM, "Ricordisamoa" ricordisamoa@openmailbox.org wrote:
How about creating a wikibase.py file in the pywikibot/ directory to
contain DataSite, WikibasePage, ItemPage, Claim, WbTime, WbQuantity, etc.?
Sounds good to me
No difference in front-end, because __init__.py would be changed from from .page import Page, ImagePage, Category, Link, User, ItemPage, PropertyPage, Claim into from .page import Page, ImagePage, Category, Link, User from .wikibase import ItemPage, PropertyPage, Claim, WbTime, WbQuantity
I'm uncertain about pywikibot.Coordinate, the documentation says it could be used for something else than Wikibase claims.
Il 01/06/2014 09:06, Amir Ladsgroup ha scritto:
I agree but one question: 1- Currently for defining an item we work this way [1] item = pywikibot.ItemPage.fromPage(page)
So Do you mean after the change we need to something like this?: item = pywikibot.wikibase.ItemPage.fromPage(page) or "from pywikibot import wikibase"
or It's just a backend change and no difference in frontend?
[1] https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Wikidata#Working_with_p...
Best
On 6/1/14, 1:15 AM, Ricordisamoa wrote:
I'm uncertain about pywikibot.Coordinate, the documentation says it could be used for something else than Wikibase claims.
It's also used when getting information from the GeoData extension, which is accessed via Page.coordinates().
-- Legoktm
pywikipedia-l@lists.wikimedia.org