Template talk:Artwork

From Wikimedia Commons, the free media repository
(Redirected from Template talk:Painting)
Jump to: navigation, search
Info non-talk.svg Template:Artwork has been protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit.
Please test any changes in the template's /sandbox or /testcases subpages, or in a user subpage, and consider discussing changes at the talk page before implementing them.

Fall back to Wikidata for Accession number[edit]

Hi, I just enabled fallback to Wikidata if the Accession number is not set. It tries to retrieve the inventory number and, if it works, shows the inventory with the message at MediaWiki:Wm-license-artwork-id-from-wikidata which includes a link to Wikidata (example: "retrieved from Wikidata"). It also puts the file in Category:Artworks with accession number from Wikidata. I tested it in the sandbox including some edge cases like multiple inventory numbers and all seemed well. If this is causing problems feel free to revert or ping me to do so. Multichill (talk) 16:32, 9 September 2016 (UTC)

I love the fallback since it exists! To make the difference less obtrusive I'd like to suggest to use the small pencil icon many Wikipedias use in Infoboxes, indicating that the data comes from Wikidata and put a hyperlink to the specific property on the item on it. That could also be might for the creator templates. --Marsupium (talk) 17:05, 23 August 2017 (UTC), 09:48, 25 March 2018 (UTC)
7 months later … what about using Template:EditAtWikidata (Q27038277)/Module:EditAtWikidata (Q27061799) for Template:Artwork? --Marsupium (talk) 09:48, 25 March 2018 (UTC)

Mobile version[edit]

On a smartphone, the template of the Artist and the Institution are too wide. These tables should be collapse. Is it possible? Pyb (talk) 16:22, 21 March 2017 (UTC)

AFAIK, not even collapsible templates can be collapsed on mobile web (whereas all tables are collapsed in the Wikipedia apps), and this table should not be collapsible on desktop. However, tables have their own “scrollbars” so that not the whole page becomes wider than the screen. I think it’s not such a serious problem, the result looks fairly good. --Tacsipacsi (talk) 21:45, 21 March 2017 (UTC)

What comes first? The Chicken or the Egg? The Artwork template or the wikidata item?[edit]

I have lately uploaded files of artwork to Commons. Where I found a Wkidata-Item to the object, I added it. Where there is no Wikidata-Item, it would be nice to have one. Now I hate to do work twice. I use the description the museums provide and add them to the Artwork-Template. Is there already a way that Wikidata extracts this information to built new items, or incorporate them into existing items? Or can I built the Wikidata-Item and than get a meaningful description on Commons. I work with Lightroom and use the LrMediaWiki-Upload Tool.When adding a known Wikidata-Item, it only adds the Wikidata-Icon without further description to the Title of the image.

I shortly want to upload images from museum at home, large enough to have a unique and valuable collection, but still unbothered by the Google Artproject. I think it would be nice, if we could show them what using Wikidata could do to their collection. --Wuselig (talk) 22:38, 18 January 2018 (UTC)

I agree that at the moment proper way is fill both Wikidata item and artwork template, which is tedious and most of the work is duplicated.
At the moment Wikidata are capable to store most of the artwork-related information and it is possible to improve this template so that it can fetch these data from Wikidata. Wikidata paintings project (d:Wikidata:WikiProject sum of all paintings) is very active, so some collections and creators are very well covered (see d:Wikidata:WikiProject_sum_of_all_paintings/Top_collections and d:Wikidata:WikiProject sum of all paintings/Top creators by number of paintings).
I think it is time to start to discuss about that, I'm a big supporter of this improvement.--Jklamo (talk) 14:35, 5 February 2018 (UTC)
@Wuselig: in the past the {{creator}} template contained a lot of redundant information, but thanks to Jarek we can now just have it fetch the data from Wikidata (example). I expect this to happen with the {{Artwork}} template too and I hope Jarek will have time for that soon :-)
So in the future the work flow would be that you upload an image of an artwork that references the right Wikidata item. The {{Artwork}} template fetches all relevant info about the work of art and you only have add the data about the photograph (own work and that you took it).
I'm slowly getting started with German collections on Wikidata. Last week I worked on the Berlinische Galerie, see d:Wikidata:WikiProject sum of all paintings/Collection/Berlinische Galerie. Looks like a nice collection, I added it to the work list on Wikidata. Multichill (talk) 19:05, 5 February 2018 (UTC)
I am switching to {{Institution}} template / Module:Institution/sandbox now. I hope that great similarity between {{Creator}} and {{Institution}} will allow me to be done with that one faster. Artwork template is the next one on the list as it relies on Creator and Institution templates. --Jarekt (talk) 19:22, 5 February 2018 (UTC)
Thanks, that sounds great. So at the moment, it would be best to do the editing at Wikidata and than just add the wikidata-identifier to the uploaded image. I am still getting started with Wikidata. So excuse the question: Is there a mask in Wikidata, which I could fill out analogous to the Artwork-Template. You see I started here with my local museum. Each object qualifies as a distinct Wikidata-item. So how can I most efficiently get all the information from the museum webpage and/or the Museum label to Wikidata? --Wuselig (talk) 13:33, 6 February 2018 (UTC)
Wuselig So for time being I would be uploading metadata to both Artwork template and Wikidata. However in the long term Wikidata upload is more important because that is where the data should (and likely will) reside eventually. As for data upload to Wikidata, two tool I could not live without are QuickStatements for data upload and wikidata Query service for reading and matching your data to the content of the wikidata. I am frequent client at d:Wikidata:Request a query asking for help with queries I have problems with. There seem to be many users eager to help. --Jarekt (talk) 16:52, 6 February 2018 (UTC)

Missleading text[edit]

Hi, in the description there is the sentence: "for all other dates use {{date}} or {{other date}}". I think we should not mention the date template because (a) is not needed and (b) it is not true that date can be used for other dates. Maybe this is the reason why i found lots of wrong usages of the date template in connection with the artwork template. --Arnd (talk) 19:27, 15 March 2018 (UTC)

Pictogram voting keep.svg Fixed info on {{Date}} template. --Jarekt (talk) 19:32, 14 April 2018 (UTC)

Rewrite in Lua[edit]

I am working for a while on Lua version of this template, which would be able to work like the current table, but with Wikidata field it will be able to fetch some data from Wikidata. At the moment Module:Artwork holds stable version and Module:Artwork/sandbox holds developmental one. {{Artwork/sandbox}} calls Module:Artwork. Please help me test it by replacing {{Artwork}} with {{Artwork/sandbox}} and verifying that the page looks properly without saving. Thanks --Jarekt (talk) 04:13, 14 April 2018 (UTC)

New version is live. Please report any issues below. Please ping me in case of Lua errors. --Jarekt (talk) 12:56, 16 April 2018 (UTC)
@Jarekt: Very cool! How does the 'wikidata_cat' variable work? I just tried it with a few values (in preview mode), but couldn't seem to turn off the category for the example I added at Commons:Village pump (which is now in Category:Mona Lisa...). Thanks. Mike Peel (talk) 14:16, 16 April 2018 (UTC)
Pictogram voting keep.svg Fixed, Thanks for reporting that one. --Jarekt (talk) 14:23, 16 April 2018 (UTC)

Future Improvements to Module:Artwork[edit]

First version of Module:Artwork is deployed so let's keep track of small improvements we can make:

  • Better Data extraction from Wikidata:
    • Exhibition history fetches data from exhibition history (P608). Currently the dates of the exhibition come from P608 Qualifiers, but they also can be properties of the exhibition item. They should be fetched from there.
    • Some files belong to multiple collections/institutions and can have multiple inventory numbers (one for each collection/institution). Not sure what that means and how to create {{Artwork}} from such data. Maybe item is really for 2 separate artworks.
    • If the subject of the template is a building than the creator/author might be stored in architect (P84). Fetch it from there.
    • Some works use author (P50), so we should recognize it as well.
  • Other:

--Jarekt (talk) 20:09, 16 April 2018 (UTC)

@Jarekt: One of the reasons why I've been focusing on categories rather than files is due to the impending arrival of structured commons. How do you envisage this template changing/migrating to use that once it's available? Maybe @SandraF (WMF): can comment here. I've also been worried about the server load when using arbitrary access to fetch info from Wikidata in the categories, but that's even more of a concern here since there's 1.8 million uses of this already, have you checked into that? Finally, it would be better to replace {{Object photo}} with this template rather than redirect {{Category definition: Object}} here, so we can use the wikidata infobox in those categories and not have a mess of category-content being included in file pages. Thanks. Mike Peel (talk) 20:37, 16 April 2018 (UTC)
Mike Peel, At the moment I am focusing on structured data what will live on Wikidata. When at some point Structured data for Commons arrives I hope we could do something similar. The steps would be:
  1. Ensure structured data has similar capabilities as Wikitext
  2. Write efficient and maintainable code to pull data from structured data and display it in a localized manner on Commons. If possible avoid templates and prefer Lua, as switching back and forth can get confusing.
  3. build mechanism for comparing Commons data to Wikidata, and copying metadata from Commons to Wikidata if possible.
  4. Part of comparing data is to flag mismatches. The final step would be to resolve mismatches and to remove redundant Wikitext.
The same steps can be used with structured data on Wikidata and on Commons. As for performance, I try to write as efficient code as possible but otherwise I believe that en:Wikipedia:Don't worry about performance. Module:Artwork is used on 1.8M pages, Module:Creator is used on 2M mages for last 2 years with no issues. But I did remove some expensive calls done by old {{Artwork}}.

Template Template:Object photo is some bad idea which is unfortunately used on a lot of pages. Lets discuss it on a separate occasion, and {{Category definition: Object}} is designed to work with it. They all call {{Artwork}} and Module:Artwork. --Jarekt (talk) 04:26, 17 April 2018 (UTC)

@Jarekt: I'm okay with your efforts to deploy Lua and wikidata. I'm probably one of the main user of Object photo. I can modify my workflow but I need to know. Because we are not talking about few pictures. I'm dealing with +9500 categories using {{Category definition: Object}} and +40 000 files, most of them using {{Object photo}} Clin Pyb (talk) 17:37, 23 April 2018 (UTC)
At this point I would not modify your flow, and I am also not a big fan of {{Object photo}} template. I found it quite counter-intuitive and I do not like the idea of templates being stored in Category namespace. We have one system for Creator and Institution templates (Creator and institution namespaces) another for book templates (template namespace and third for artworks (category namespace). I think, it might be time again to talk about "Artwork" namespace. But that might be topic for another discussion. --Jarekt (talk) 02:11, 24 April 2018 (UTC)

One of the important missing features is the handling of qualifiers added to creator: anonymous in Wikidata. See d:Wikidata:WikiProject_Visual_arts/Item structure#Use of creator_(P170) in uncertain cases for a list and d:Q19911475 for an example. That should feed the "option" parameter of {{Creator}}. -Zolo (talk) 15:44, 24 April 2018 (UTC)

Zolo, Excellent suggestion. --Jarekt (talk) 14:02, 25 April 2018 (UTC)

Proposed tweaks[edit]

Thanks for the template. I'll propose here minor, as I think of them:

  • header: when no creator is given by Wikidata, do not show "unknown", leave blank (example)
  • do now show "object type" when it is "painting" or "sculpture" (it is obvious, no need to take up space and reader's time with that). --Zolo (talk) 07:59, 20 April 2018 (UTC)
I agree with the header (null is not unknown), but I don't agree with hiding "object type", that's useful metadata. If you look at museum websites, it's quite common to include it. Maybe better to move it down a bit in the template. Multichill (talk) 09:53, 20 April 2018 (UTC)
I changed Module:Artwork/sandbox to reflect the header suggestion, as for "object type" it was introduced before Wikidata and it seems like people find it useful. --Jarekt (talk) 12:22, 20 April 2018 (UTC)

Category:Artwork template with implicit creator[edit]

@Jarekt: files in this category (like File:'Autumn Landscape' by William Mason Brown.jpg)) are not actually showing a creator template. Is that intentional or not? Multichill (talk) 09:10, 21 April 2018 (UTC)

Multichill, that category is going away, it was added by old {{Artwork}} when name in the author string matched, existing creator. But there were too many mismatches to add them by the bot. For a while I was adding creator templates by hand but that is too much work. I wrote once a bot that automatically adds creator templates when file is inside a category which is a homecat of the same template, but lost the code somehow after the first run. At the moment local variables take precedent over fields from Wikidata. So for the files that are in Category:Artwork template with implicit creator and have item ID, we should just remove the author field and we should see creator template. --Jarekt (talk) 18:00, 21 April 2018 (UTC)
@Jarekt: that makes sense.
I had a look at the first file in the category (File:'Mandarin Ducks in Snow' from the 'Colorful Realm of Living Beings' by Ito Jakuchu.jpg) in I noticed the "author" field is set, but not showing. Can you fix that? This happens a lot when {{Information}} gets converted to {{Artwork}}. Multichill (talk) 10:22, 24 April 2018 (UTC)
Pictogram voting keep.svg Fixed the "author" field issue in Module:Artwork/sandbox will deploy with the next batch of changes. --Jarekt (talk) 13:53, 25 April 2018 (UTC)

Category:Artworks without Wikidata item and Category:Paintings without Wikidata item broken[edit]

@Jarekt: Category:Artworks without Wikidata item and Category:Paintings without Wikidata item seem to be gone in Module:Artwork. Can you please restore it? Most of my reports are broken now. In this version you can see the logic. I assume more of the tracker categories didn't completely survive the move. Can you also check:

  1. Category:Artworks with Wikidata item should have a space in front of the sortkey and the Wikidata item as the sortkey
  2. Category:Artworks with known accession number should also have a space in front of the sortkey and use the inventory number as the sortkey. Some cleanup needs to be done to remove wikitext crap in the sortkey

The space in the sortkey is a MediaWiki trick to disable some sorting logic. Thanks, Multichill (talk) 09:41, 21 April 2018 (UTC)

I will look into this tonight (in ~ 6 hours) --Jarekt (talk) 18:01, 21 April 2018 (UTC)
@Jarekt: the without categories seemed to have filled up again. Thanks for that! I hope you can also have a look at the sortkey issues. Multichill (talk) 10:15, 24 April 2018 (UTC)
Multichill, I added spaces in front of sortkeys in Module:Artwork/sandbox (around lines 328). The "cleanup" is at the moment only a test based on length. We could come up with some more elaborate cleanup stripping URLs, and wikitext beforehand. I wonder if someone come up with some regexp (like [1]). The issue with sortkeys is that they are not visible, so some external testing will be needed. --Jarekt (talk) 14:23, 24 April 2018 (UTC)

The template is using redundantly the uploaded image on the box[edit]

Hi, please look at File:Berta Lutz no avião do qual se lançaram panfletos de propaganda pelo voto feminino.jpg. The item for that file on Wikidata has image (P18) property and the Artwork template used on the image show the own image uploaded. I don't think the redundancy it's ok. What do you guys think, am I wrong? Ederporto (talk) 05:07, 23 April 2018 (UTC)

Also, the "usage of the file" points to the image itself. Ederporto (talk) 05:10, 23 April 2018 (UTC)
Ederporto the idea is that that is the simplest way to spot when you have a wrong item ID, which is rare but happens. it also shows when the item is missing image (P18). It would not be hard not to show the image if it is the same as the current page. How do others feel about this feature? --Jarekt (talk) 11:52, 23 April 2018 (UTC)
I like the thumbnail, but can agree with it being a bit redundant if it's the same file. Probably better to only show it when it's a different file.
This also opens up the interesting possibility to query the database for {{Superseded}} images that are in use on Wikidata. Multichill (talk) 10:14, 24 April 2018 (UTC)
I think it's useful to always have it there, even if it is a duplicate - otherwise you don't know if the image hasn't been set or if it's the same as the current file. I don't think the redundancy is a problem, as long as it's done by the code not manually. Thanks. Mike Peel (talk) 12:27, 24 April 2018 (UTC)
I find it useful for multiple images of the same artwork. It suggests the preferred one and possibly superseded. For avoiding redundancy the thumbnail could be changed by a text like "Image used in corresponding Wikidata item". --V.Riullop (talk) 09:02, 25 April 2018 (UTC)

Category:Artworks with Wikidata item missing image[edit]

I renamed Category:Artworks with Wikidata item without image to Category:Artworks with Wikidata item missing image. That was already done in the template. Some subcategories like Category:Relief No. 1 - Henry Moore (LH 450) still use the old category. It seems to be something with a local image field. @Jarekt: can you have a look, can't seem to find where this is set. Currently we only check for P18 (image) on Wikidata, but we also have a few files like File:Rabier - Oscar roi du désert, 1928.djvu that use a different image property. Would be nice to filter out these too. Either by hard coding a list of relevant properties or just looping over the properties and see if a property with type "commonsMedia" is present. This is a minor improvement, only a few files and they're still hidden because of the MET overload... Multichill (talk) 10:11, 24 April 2018 (UTC)

Multichill, All the "without" categories in the old {{Artwork}} were added if the field was filled on Commons but missing on Wikidata, the only exception was Category:Artworks with Wikidata item without image which was added if image on Wikidata was missing. Now I added field image to {{Artwork}} (still have to update the documentation) to make it compatible with {{Category definition: Object}}, Artwork adds both Category:Artworks with Wikidata item without image (defined on Commons & missing on Wikidata) and Category:Artworks with Wikidata item missing image (not defined on Commons and missing on Wikidata). I could not find any images in the first category when testing, because I wanted to add QuickStatement link to quickly upload such images to image (P18). --Jarekt (talk) 12:06, 24 April 2018 (UTC)
Speaking Category names in Creator template maintenance and Category:Institution template maintenance I tried to follow the following rules:
  • Category is named after the field name in the template not the property on Wikidata
  • The following keywords are used:
  • A single template can only be in one of mismatching/redundant/missing/local categories for each field.
I think it would be less confusing if we adopted similar system with Artworks, especially using the same keywords. Although we would have to invent a new keyword for current Category:Artworks with Wikidata item missing image. --Jarekt (talk) 12:31, 24 April 2018 (UTC)

author field[edit]

The author field doesn't appear, despite being used. --Cold Season (talk) 23:58, 24 April 2018 (UTC)

Pictogram voting keep.svg Fixed in Module:Artwork/sandbox will deploy with the next batch of changes. Thanks for reporting. --Jarekt (talk) 13:51, 25 April 2018 (UTC)

Future Improvements to related to Wikidata (one section per field)[edit]

I find it hard to keep track of different suggestions of improvements. So lets have a section for each. If anybody is interested in writing code to handle any of those cases let me know. --Jarekt (talk) 14:34, 25 April 2018 (UTC)

Collapsing Creator and Institution templates inside Artwork template[edit]

See discussion at Commons:Village_pump#Innercollapse_and_outercollapse. --Jarekt (talk) 13:51, 25 April 2018 (UTC)

Author and Artist fields[edit]

Need to improve wikidata harvesting with possible separate function for it:

--Jarekt (talk) 14:34, 25 April 2018 (UTC)

Institution and accession number fields[edit]

Need to improve wikidata harvesting with possible separate function for it. Special cases to handle:

--Jarekt (talk) 14:34, 25 April 2018 (UTC)

Commons Creator page (Q24731821) is the wrong item for the QuickStatements export here[edit]

Thanks for updating to Wikimedia Commons (Q565) or perhaps a new item "Commons Artwork template", --Marsupium (talk) 21:59, 26 April 2018 (UTC)

I was thinking about adding references of imported from (P143) Wikimedia Commons (Q565) and reference URL (P854) with actual page URL to QuickStatements exports. I debated about creating a new item for "Commons Artwork template", but was not sure what else would be in such item. --Jarekt (talk) 03:44, 27 April 2018 (UTC)

Accession numbers swallowed[edit]

This fixes the problem of accession numbers getting swallowed since recently. Random example: File:"Among Friends", Stanley Park, Vancouver, B.C..jpg. Thanks in advance for deploying! --Marsupium (talk) 21:05, 26 April 2018 (UTC)

Face-smile.svg Thank you--Jarekt (talk) 03:44, 27 April 2018 (UTC)