Pywikibot/Script data flows
Appearance
Pywikibot scripts are typically executed in (a logic) sequence, to be able to update a maximum of statements, with a minimum of human effort.
Often these scripts are used in the context of an edit-a-thon, or a WikiProject. But they can also be useful for personal use.
Typically Wikidata is the central registration system. Multiple other systems are interrelated.
OpenRefine
[edit]An Excel, or Google Spreadsheet can be used as input for OpenRefine to register project items (rows, and columns with Q-numbers, P-numbers, and statements via schema's).
Persons
[edit]- pwb create_person: name, lastname, firstname, gender, nationality,
- pwb create_firstname
- pwb create_lastnam
- pwb set_homonym_property
- pwb add_statement
- ListeriaBot, Special:WhatLinksHere, Wikidata Query (filter on WikiProject item number)
- pwb copy_label
Wikimedia Commons Category
[edit]- Create a Wikimedia Commons Category
- Add images to the category
- pwb add_image_from_sdc
- pwb add_wikitext, to add a category
Add Wikimedia Commons SDC Depict
[edit]- Assign a media file to a Wikidata item
- pwb copy_label
- This can possibly insert images to Wikipedia pages
or (the reverse way)
- Add an SDC depict statement to a media file
- pwb add_image_from_sdc
- This can possibly add the media file to the Wikidata item
Manage edit-a-thons
[edit]- Organise a writing session, project, or photo contest.
- Determine the subject of the session, together with the museum or the archive
- Create a WikiProject in Wikidata
- pwb add_statement (P6104) (WikiProject) to link target subjects - requiring a list of Qnumbers
- Write a Wikidata Query (filter on WikiProject item number)
- Create a ListeriaBot query page
- Execute WDFIST to find and register images in Wikidata
- Run query or Special:WhatLinksHere
- pwb copy_label (requiring a list of Qnumbers)
- Run ListeriaBot query (Lijst handmatig bijwerken)
- Create a project page (Possibly an Event page)
- Create a Campaign dashboard, mentioning the project page
- Upload available articles to the Campaign dashboard
- Ask users to register via the Campaign dashboard
- pwb welcome_user (users participating to the edit-a-thon having created articles)
- pwb register_article_project (adding section on talk page, show linked Qnumbers)
- pwb copy_label (enrich items; register Wikipedia article in Wikidata).
- Report about the edit-a-thon (using Campaign dashboard)