GLAM/Newsletter/May 2023/Contents/Finland report
|
Adding authority control templates with Pywikibot
In early 2023, Wikimedia Finland began contemplating ways to increase the utilization of Wikidata in Finnish Wikipedia. In March, there was a request on the page bottipyynnöt (bot requests) of Finnish Wikipedia to add authority control and taxonomy bar templates to all related articles. As it would align well with the preferences of active Wikipedia editors on how to use Wikidata, Wikimedia Finland stepped up and undertook this task.
For those unfamiliar, authority control is a term common in libraries, and in Wikipedia, it refers to content that exists across various library databases. Some external sources provide extensive biographical information, while others furnish names and dates useful in identifying discrepancies, like determining whether two different names correspond to the same person or vice versa. Incorporating easy access to these external databases can facilitate the creation of high-quality articles. The taxonomy bar functions similarly, except it links to many biology-related databases rather than biographical ones.
Technically, the authority control and taxonomy templates appear as a bar at the bottom of the page. They utilize Wikidata as a common database for identifiers, which a module at the end of each page retrieves. This data is shared across Wikipedias in various languages. Articles related to taxonomy have a comparable bar at the bottom of the page, linking to several biology databases. The task began with Ipr1 updating the Finnish Wikipedia authority control module written in the Lua programming language to the latest version from English Wikipedia and conducting the necessary localizations.
Given the enormity of the task—targeting 12% of all Finnish Wikipedia articles—the Pywikibot tool was used to automate the page edits. Pywikibot is a Python-written library used in conjunction with scripts to perform desired edits on Wikipedia articles. While a bot doesn't eliminate the need for human intervention, it significantly reduces the repetition involved in tasks. The Python-written scripts also enable the addition of various checks and validations when dealing with different types of articles.
For Ipr1, new to Pywikibot and Python, Zache created a documentation page on Finnish Wikipedia and provided example scripts on GitHub as a starting point for template additions. Ipr1 conducted three major bot runs from these resources and several smaller ones to add the templates. The task also involved normalizing article layouts to ensure uniformity and facilitate bot-added templates. While a bot was used for normalization, considerable manual editing was needed for corner cases. In the latter half of May, Ipr1 completed the task, updating a total of 70,000 articles.
- From the team
- Albania report
- Australia report
- Brazil report
- Finland report
- India report
- Indonesia report
- Italy report
- Kosovo report
- New Zealand report
- Philippines report
- Sweden report
- Switzerland report
- Uganda report
- UK report
- USA report
- Special story
- GLAM Wiki conference report
- Wiki Loves Living Heritage report
- WMF GLAM report
- Calendar