Skip to content

Wikidata lists – Full Circle

So my Wikidata list-generating bot Listeria has become popular in certain circles, creating and updating lists of artworks, species, or ORCID ID holders. With the introduction of the Wikidata SPARQL service, Wikidata queries are becoming more mainstream, and lists are a logical next step.

At the same time, many Wikipedians lack an awareness of Wikidata, and hesitate to go there and edit. Micro-contributions are a way for people to improve Wikidata without much fuzz, but are “hidden” in external tools.

So I added a little bit of code to Listeria. The output now contains a few minor extras, like class names for table cells. These are then used by JavaScript code to allow adding and editing of information in Listeria table cells, right on Wikipedia. Label, description (where unavoidable), item links, dates, coordinates, strings, and images are supported. Simply add

Dialog to add an item link

Dialog to add an item link

to your common.js page on Wikipedia, hover over a Listeria-generated table cell, and you will see add/edit options. Clicking on those will open a dialog to find/enter a value, validated through Wikidata itself. Clicking OK adds this information to Wikidata. Done! (Because of the table being static wikitext, your addition will only show after the next Listeria update, but it is already on Wikidata proper.)

The JavaScript code is adaptable, meaning it could be used to let people edit Wikidata-based infoboxes etc. Of course, it would be much more effective to have this enables for all Wikipedia users, and with more Listeria lists around. But for now, I am content with this being a demo, which may inspire “official” functionality be the WMF, in a few years’ time.


  1. Wittylama wrote:

    I wonder – is it possible to also edit the TITLE of the column? I’ve just installed the script and can edit the cells, but not the heading. For example, in this article (at the time of writing) The column “collection” is in lowercase but it should have a capital “C”. Equally, I’d like to change “Inception” to “Date” which is more normal on Wikipedia. Is this possible?

    Tuesday, September 8, 2015 at 16:35 | Permalink
  2. Magnus wrote:

    If you edit the source of the article, see the template parameter at the top saying


    By default, the column titles are the property labels, in this case, P571=’inception’. Alter this to


    to override the default column title. Detailed instructions here:

    Tuesday, September 8, 2015 at 16:38 | Permalink
  3. Sylvain Machefert (@ wrote:

    Hi WittyLama,
    the issue is that lowercase for labels is a convention on wikidata: so best thing is that Magnus add the capitalization to his bot rather than making change on wikidata.

    BTW, good job Magnus, thanks for your help spreading wikidata to wikipedia!

    Tuesday, September 8, 2015 at 16:40 | Permalink
  4. Wittylama wrote:

    Thanks Magnus, Sylvain.

    I’ve made the change suggested – I see no difference yet, so I assume the bot will change it the next time it updates?

    Good idea Sylvain. Magnus – can you alter the bot to ensure that the first letter of the first word in each label is always capitalised?

    Tuesday, September 8, 2015 at 16:47 | Permalink
  5. Magnus wrote:

    @Wittylama The list is updated once every 24h. You can click on “manually update” at the top of the list to force the update now.

    I did auto-capitalisation in the beginning, but someone asked me to not do that, because, reasons. Don’t want to get in a capitalisation war 😉

    Tuesday, September 8, 2015 at 16:53 | Permalink
  6. Wittylama wrote:

    I’ve done the “manual update” now. That worked, thanks. I thought that button meant that I would be “manually” overriding the update system… I suggest changing the label to “refresh table” or something similar.

    As for the capitalisation… it’s the Manual of Style that table column headings be in sentence-case (i.e. first letter capitalised) If someone doesn’t agree with that they should take it to the discussion page. Otherwise I’d have to manually override the title each time just to change the first letter!

    Tuesday, September 8, 2015 at 17:00 | Permalink
  7. Jane Darnell wrote:

    Wonderful to see this override in the query line for the properties (otherwise known as column headings). Great idea to do it this way! I understand about the capitalization – it’s not always desired. The more tuning you can do in the bot setup the better.

    Tuesday, September 8, 2015 at 17:58 | Permalink
  8. Jane Darnell wrote:

    Could we please have this functionality in Spanish?

    Tuesday, September 8, 2015 at 18:14 | Permalink
  9. Magnus wrote:

    @Jane done.

    Tuesday, September 8, 2015 at 20:09 | Permalink
  10. Jane Darnell wrote:

    …and used!

    Tuesday, September 8, 2015 at 23:27 | Permalink
  11. geraki wrote:

    I’d love to see this working in el.wikipedia. Please?

    Thursday, September 17, 2015 at 17:48 | Permalink
  12. geraki wrote:

    You are a god!

    Thursday, September 17, 2015 at 18:42 | Permalink
  13. Magnus wrote:

    @Geraki: I have added el to the daily update cycle.

    Friday, September 18, 2015 at 14:19 | Permalink