Jump to content

Pywikibot/Script data flows

From Wikimedia Belgium

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]
  1. pwb create_person: name, lastname, firstname, gender, nationality,
  2. pwb create_firstname
  3. pwb create_lastnam
  4. pwb set_homonym_property
  5. pwb add_statement
  6. ListeriaBot, Special:WhatLinksHere, Wikidata Query (filter on WikiProject item number)
  7. pwb copy_label

Wikimedia Commons Category

[edit]
  1. Create a Wikimedia Commons Category
  2. Add images to the category
  3. pwb add_image_from_sdc
  4. pwb add_wikitext, to add a category

Add Wikimedia Commons SDC Depict

[edit]
  1. Assign a media file to a Wikidata item
  2. pwb copy_label
  3. This can possibly insert images to Wikipedia pages

or (the reverse way)

  1. Add an SDC depict statement to a media file
  2. pwb add_image_from_sdc
  3. This can possibly add the media file to the Wikidata item

Manage edit-a-thons

[edit]
  1. Organise a writing session, project, or photo contest.
  2. Determine the subject of the session, together with the museum or the archive
  3. Create a WikiProject in Wikidata
  4. pwb add_statement (P6104) (WikiProject) to link target subjects - requiring a list of Qnumbers
  5. Write a Wikidata Query (filter on WikiProject item number)
  6. Create a ListeriaBot query page
  7. Execute WDFIST to find and register images in Wikidata
  8. Run query or Special:WhatLinksHere
  9. pwb copy_label (requiring a list of Qnumbers)
  10. Run ListeriaBot query (Lijst handmatig bijwerken)
  11. Create a project page (Possibly an Event page)
  12. Create a Campaign dashboard, mentioning the project page
  13. Upload available articles to the Campaign dashboard
  14. Ask users to register via the Campaign dashboard
  15. pwb welcome_user (users participating to the edit-a-thon having created articles)
  16. pwb register_article_project (adding section on talk page, show linked Qnumbers)
  17. pwb copy_label (enrich items; register Wikipedia article in Wikidata).
  18. Report about the edit-a-thon (using Campaign dashboard)

See also

[edit]