Pywikibot python 3 tutorial

Tobias1984, Jan Zerebecki and Katie Filbert can answer questions about Wikidata data modeling etc.

From command line

Create a file named with the following content e.g.

mylang = "sv" family = "wikipedia"

This will set the wikiplatform the code below will try to go to your userpage (change from mine to yours) and publish the text on your user talk page.

-page:"User talk:"

From the command line: add_text -up -talk -page:"User talk:Mattias Östmar (WMSE)" -text:"Hi from pywikibot!~~~~"

From within a script/iPython/notebook

Extra GUI goodies when using Jupyter Notebook

Wikidata item "Värmdö Church (Värmdö Kyrka):

Using pywikibot to interact with Wikidata

A quirk with wikidata - we also need to create a 'data_repository' out of the pywikibot.Site() object

repo = wikidata.data_repository()

Store the item data into a variable so we get the dictionary containg the actual data

A non-wiki way of getting the data from a page. (use pywikibot insted)

Playing with item "Esino Lario" which has more data

Gotcha: Each sub-dict key (e.g. each claim) returns a list of objects