ListeriaBot
ListeriaBot is a Wiki bot to automatically execute (simple) SPARQL queries to build Wikipedia tables on project pages to support e.g. edit-a-thons.[1]
To prepare an edit-a-thon, it helps a lot to build a proactive list of subjects related to the theme, for which Wikidata items, Wikipedia pages, and Wikimedia Commons media files are created or amended. Using ListeriaBot one can automatically build a list of blue and red links in a table. Red links are pages that do not exist, and can be easily created by one click of the mouse. Blue links are articles that can be extended or enhanced. Participants can easily choose their page to write according to their interest. Also, the number of existing Wikipedia pages in other languages can be easily indicated. As well as an image (P18). You can execute the same query on multiple language Wikipedia's, to get the list specific to the language. Then you can put the link to the Wikipedia project page on the Wikidata WikiProject item page. Doing so all major Wikimedia platforms (Wikipedia, Wikidata, and Wikimedia Commons) are interlinked.
Main steps to set up a project
[edit]- Create and describe a WikiProject item on Wikidata
- Link project items to the WikiProject; you might use property P6104
- Design a Wikidata query, returning a list of items; use
?item - Please also create a Campaign dashboard, so you get automatic statistics about the user activity.
- Create a project page (Wikipedia, Wikimedia Commons, Meta). For Wikipedia, you can have multiple languages.
- Link your project pages to the Wikidata project
Doing so, you get an integrated project environment, interlinking all involved platforms.
Specific techniques
[edit]- Analyse your theme, and search for example pages (title + a number of core properties).
- Create a WikiProject in Wikidata; example.
- Use Excel or Google Spreadsheets to compile a subject list.
- Use OpenRefine, link all the objects to the WikiProject by using e.g. Maintained by WikiProject (P6104).
- You could use as well Pywikibot
pwb add_statementor QuickStatements. - What Links Here (Wikidata)
- Build a Wikidata query.
- Copy the query into a {{Wikidata list}} on a project page.
- Save the page.
- Execute the query once manually.
- Verify the results.
- Correct any errors, in the script, and in the data.
- The ListeriaBot runs at regular times, once additional data is available.
- Create a Wikimedia Commons Category + {{Wikidata Infobox}}.
Wiki code examples
[edit]Here is a real example. You can just copy-paste the Wiki code in a project page:
Lijst van artikelen die kunnen worden aangemaakt, of aangepast, tijdens de schrijfsessie in het kader van [[../../../|Bouwfirma Serck nv]].
* [[wikidata:Special:WhatLinksHere/Q114422535|Wikidata lijst]]
{{Wikidata list|sparql=SELECT ?item ?linkcount WHERE {?item wdt:P6104 wd:Q114422535; wikibase:sitelinks ?linkcount; wdt:P31 wd:Q5.}
|columns=P18,item,label:naam,P735,P734,alias/nl:alias,description:beschrijving,P937:werklocatie,P19,P20,P569:geboren,P570:gestorven,P27:nationaliteit,P101,P106,P108,P800,P39,P166,P103,?linkcount:pages,P21:gender,P990:stem
|min_section=1
|sort=label
|links=red
|thumb=90
|autolist=fallback
|summary=itemnumber
}}
{{Wikidata list end}}
Other examples:
How to identify useful properties
[edit]Every entity instance should have the core properties documented.
- Consult the P1963 property for the instance, example: mens.
- When needed, you might add missing properties
- Compile the list of P-numbers after the
columnsparameter.
Related functionality
[edit]- Wikidata
- Find images for Wikidata (WDFIST) - click on the link to find and register images. The system is searching images that are used on Wikipedia pages, to propose them to add to Wikidata with (P18)
- Wikidata Query - Execute the query
- OpenRefine
- Pywikibot
- QuickStatements
Known problems
[edit]Automatic execution does not work
[edit]- Maybe there is a syntax error.
- Verify the history of the Wikipedia page.
- Try to run the job manually (should provide OK status).
Delay in execution
[edit]It is not always clear why there is a delay in execution. Machine capacity? Technical reasons?
- Try to run the job manually
Bad Gateway
[edit]Seems to frequently occur.
Content of pages possibly not updated.
Updated table not visible for not logged-in users
[edit]- Perform a cache refresh
Killed by OS for overloading memory
[edit]The query is possibly too complex.
Maybe the content of page was still updated.
Field 'message' doesn't have a default value
[edit]Reason unknown.
ListeriaBot Toolforge Webservice request timed out
[edit]Other errors
[edit]- Wikimedia Error: Wikimedia Toolforge Error: Our servers are currently experiencing a technical problem. This is probably temporary and should be fixed soon. Please try again later.
- 503 Service Unavailable: No webservice: The tool responsible for the URL you have requested, https://listeria.toolforge.org, is not currently responding.
External links
[edit]See also
[edit]- User documentation (template)
- Manage Wiki projects using Wikidata (schema)
- Pywikibot/Script data flows (use Pytwikibot scripts for project management)
- Wikidata:Listeria (documentation)
Notes and references
[edit]- ↑ By community agreement, ListeriaBot queries are not accepted in the main namespace, although it would technically work.