User:Jsamwrites/Wikimedia Hackathon 2017

Some discussions during mw:Wikimedia Hackathon 2017

May 20, 2017 edit

Editing Wikipedia using Pywikibot edit

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

Thanks uk:User:Bunyk

SPARQL for Wikidata edit

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 edit

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).

Thanks User:TweetsFactsAndQueries

Property Constraints edit

Thanks User:TweetsFactsAndQueries

Harvest Templates edit

Harvest Templates can be used to extract data from Wikipedia templates and then copy them to Wikidata. Thanks it:User:Laurentius.

Petscan edit

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.

Thanks User:ԱշոտՏՆՂ

May 21, 2017 edit

OOjs UI edit

mw:OOjs UI is a user interface library for creating front-end web applications.

Thanks mw:User:Matma Rex

Bot development edit

  • Using Pywikibot to create notification robots

Thanks User:Strainu, User:Clco

Event Streams edit

Thanks User:Joal