GSoC/GCI Archive
Google Code-in 2014 Wikimedia Foundation

CommonsMetadata should not ignore book templates if they are no other information templates on the page

completed by: Geoffrey Mon

mentors: Gergő Tisza

CommonsMetadata parses machine-readable data on image description pages and exposes them through the imageinfo API.

File pages use a set of templates (InformationArtworkPhotographBook) to provide machine-readable author information. CommonsMetadata currently ignores Book templates because the machine-readable author names they provide are usually not really authors; but this behavior is wrong when Book is the only source of author information on the page (in that case, the image is typically *about* the book, not just *from* the book, and the book author should be displayed in the image credits).

CommonsMetadata should use the information from a Book template iff it is the only info template on the page (per TemplateParser::$infoTemplateClasses).

This is T74084 (reopened) in Wikimedia's issue tracker.

Students are required to read Wikimedia's general instructions first.