User:Jsamwrites/Wikimedia Hackathon 2017
Some discussions during mw:Wikimedia Hackathon 2017
May 20, 2017
Editing Wikipedia using Pywikibot
Pywikibot is a python library that can be used to read and edit Wikimedia sites. Following is a very simple program that can be used to create a new page on a user space, if it doesn't exist.
import pywikibot p = pywikibot.Page(pywikibot.Site(fam="wikipedia", code="en"), 'User:Jsamwrites/Sandbox/Test') if p.exists() == False: p.text = "hello world! testing pywikibot" #Wikipedia text context p.save(summary="Editing wikipedia using pywikibot") #Summary of the changes
SPARQL for Wikidata
During this SPARQL for Wikidata workshop, Wikidata was briefly introduced and Query Service was also presented with some examples.
Thanks User:Frimelle and User:Multichill
For selective data dump
Query Service can be used to get the results in the form of csv or tsv format. Linked Data Fragments Endpoint can be used to get triple data (when one or two components of the triple is known).
- Example Query: Get RDF Dumps of all instances of programming languages: Try it on [Data Fragments for Wikidata]
- property constraint (P2302) is used to specify constraints on properties
- Help:Property constraints portal
Harvest Templates can be used to extract data from Wikipedia templates and then copy them to Wikidata. Thanks it:User:Laurentius.
Introduction to Petscan. Petscan can be used to find the articles that belong to some categories and then edit the associated Wikidata entries. It is also possible to navigate to subcategories (and subcategories of subcategories and so on ...) using the depth field. Pywikibot scripts can also be used to easily edit Wikipedia articles.
May 21, 2017
mw:OOjs UI is a user interface library for creating front-end web applications.
Thanks mw:User:Matma Rex
- Using Pywikibot to create notification robots
Thanks User:Strainu, User:Clco
- Use of evolving schema. Refer en:Apache Avro
- EventStreams for continuous stream of structured event data (replacement to RecentChanges).
- Wikidata Graph