Page MenuHomePhabricator

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

Description should be rebuild as LUA module 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.

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

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

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?

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.

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.