Page MenuHomePhabricator

Convert Template:Artwork to LUA and use Wikidata
Closed, ResolvedPublic

Description

https://commons.wikimedia.org/wiki/Template:Artwork should be rebuild as LUA module https://commons.wikimedia.org/wiki/Module:Artwork. All current functionality should be kept. For some fields a fallback to Wikidata should be implemented. This fallback should be used if the field is not set locally and the "wikidata" field is set to a Q<id>.

Zolo already made a start with this.

Event Timeline

Multichill raised the priority of this task from to Low.
Multichill updated the task description. (Show Details)
Multichill added subscribers: Aklapper, Multichill.
Ricordisamoa updated the task description. (Show Details)Apr 20 2015, 6:53 AM
Ricordisamoa set Security to None.
Restricted Application added a project: Wikidata. · View Herald TranscriptJun 12 2015, 2:57 PM
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 5:53 PM
Restricted Application added a subscriber: Matanya. · View Herald TranscriptSep 4 2015, 5:53 PM
Base added a subscriber: Base.Jan 5 2016, 8:41 PM

I'm going to take a look, and see what the current status is.

SandraF_WMF added a subscriber: SandraF_WMF.
Jarekt added a subscriber: Jarekt.Feb 16 2018, 3:55 PM

I began to work on this task. See c:Module:Artwork/sandbox. The plan is similar to T89599 and T89597 tasks and has several stages

  1. reproduce current Artwork template capabilities in Lua
  2. supplement missing artwork parameters with data from Wikidata
  3. compare Commons and Wikidata values and add them to categories tracking redundant, mismatching and missing (on Wikidata) values, as it is done with Creator and Institution templates
  4. construct ways to build QuickStatements commands to allow easily move data missing on Wikidata. That is done in batch and individual template modes.

Step number 2 has will rely on rewriting the following templates or writing something in Lua that displays internationalized version of data stored in item properties:

  1. c:Template:Size, Zolo has advanced version of this code
  2. c:Template:Technique
  3. c:Template:I18n/objects
  4. c:Template:ProvenanceEvent
  5. c:Template:Inscription
Jarekt claimed this task.Mar 2 2018, 6:27 PM

Some progress to report:

  • Template:Size is now rewritten in Lua, See c:Module:Size
  • A preliminary version of Module:Artwork can be found at Module:Artwork/sandbox with some tests at Module talk:Artwork/sandbox/testcases. The code can pull from Wikidata: creator template for artist field, institution template for institution field, authority control data (if any), dimensions, title, year of creation, object type based on P31. I or someone else should look into rewriting Template:Technique. What other Wikidata properties we should harvest?
Jane023 added a subscriber: Jane023.Mar 3 2018, 7:28 AM

What other Wikidata properties we should harvest?

It would be nice if items listed under "Owned by" on Wikidata could be stuffed into "| object history =" in the artwork template on Commons.

Jarekt closed this task as Resolved.Apr 17 2018, 4:05 PM

Module:Artwork is now live on Commons. I assume the module will go through several iterations, but the initial version mostly focused on reproducing capabilities of current {{Artwork}} template is deployed.