Jump to content

ListeriaBot

From Wikimedia Belgium
Translate this page; This page contains changes which are not marked for translation.

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]
  1. Create and describe a WikiProject item on Wikidata
  2. Link project items to the WikiProject; you might use property P6104
  3. Design a Wikidata query, returning a list of items; use ?item
  4. Please also create a Campaign dashboard, so you get automatic statistics about the user activity.
  5. Create a project page (Wikipedia, Wikimedia Commons, Meta). For Wikipedia, you can have multiple languages.
  6. Link your project pages to the Wikidata project

Doing so, you get an integrated project environment, interlinking all involved platforms.

Specific techniques

[edit]

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.

  1. Consult the P1963 property for the instance, example: mens.
    • When needed, you might add missing properties
  2. Compile the list of P-numbers after the columns parameter.
[edit]

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.
[edit]

See also

[edit]

Notes and references

[edit]
  1. By community agreement, ListeriaBot queries are not accepted in the main namespace, although it would technically work.