On Jul 19, 2014 8:23 AM, "Ricordisamoa" ricordisamoa@openmailbox.org wrote:
How does MediaWiki decide when to show the mw_metadata table in file
description pages?
The imageinfo API lists 3 different metadata types: metadata,
commonmetadata and extmetadata.
While commons:File:Gaivota - PortosÃn-5.jpg <
https://commons.wikimedia.org/wiki/File:Gaivota_-_Portos%EDn-5.jpg%3E displays the EXIF info, commons:File:Chess klt45.svg < https://commons.wikimedia.org/wiki/File:Chess_klt45.svg%3E does not.
However, the imageinfo query for the latter <
https://commons.wikimedia.org/w/api.php?action=query&format=jsonfm&t... shows width and height. Are they just ignored by MediaWiki when rendering the final HTML?
I am trying to replace an old function in pywikibot that searches for
"mw_metadata".
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Very roughly speaking, meatadata shown on the page corresponds to the commonmetadata api prop. (To be technically accurate each file type can display whatever it wants in the metadata section of the description page. However all file handlers in core use the "common" metadata) The svg didn't display width/height because that particular svg was uploaded before we displayed that property in the metadata section for svgs.
Svgs in particular only display the box if there is a title, description, originalwidth, or originalheight property. We don't have support for more complex svg metadata.
As for api properties: *metadata = all internal metadata in the db. Can be just about anything and different keys are possibly used for different file types *commonmetadata = metadata field converted to look like what metadata prop of jpeg files look like (eg exif-ish) *extmetadata = stuff from file page added in.
--bawolff