Commons:Bots/Requests/MatrixBot 6

MatrixBot (talk · contribs) 6


Operator: Matrix (talk · contributions · Statistics · Recent activity · block log · User rights log · uploads · Global account information)

Bot's tasks for which permission is being sought: Add {{Gallery page}} to gallery pages which don't have them. The category will be determined as the P373 on Wikidata linked to the gallery.

Automatic or manually assisted: automatic

Edit type (e.g. Continuous, daily, one time run): continuous as new gallery pages are being made

Maximum edit rate (e.g. edits per minute): 20

Bot flag requested: (Y/N): N

Programming language(s): pywikibot

Matrix(!) ping onewhen replying {user - talk? - uselesscontributions} 12:38, 24 December 2025 (UTC)

Discussion

Test edits are below, since I don't want to interrupt task 6:

Test edits

Source code at . —Matrix(!) ping onewhen replying {user - talk? - uselesscontributions} 12:38, 24 December 2025 (UTC)

Req'd at Commons:Bots/Work_requests#Adding_the_gallery_page_template_to_galleries by @PrototyperspectiveMatrix(!) ping onewhen replying {user - talk? - uselesscontributions} 12:39, 24 December 2025 (UTC)
Could gallery title be inferred from page name? So duplications will be avoided and page renames will be simpler. EugeneZelenko (talk) 16:06, 24 December 2025 (UTC)
@EugeneZelenko: I don't think I understand? Do you mean the category will be inferred from the gallery name? —Matrix(!) ping onewhen replying {user - talk? - uselesscontributions} 11:50, 31 December 2025 (UTC)
Gallery page is passed explicitly into {{Gallery page}}. Could this be avoided? EugeneZelenko (talk) 16:21, 31 December 2025 (UTC)
@EugeneZelenko: oh, that's the category name. I think it's a good idea, since if the gallery gets moved, then we don't have to update the template (since otherwise it would rely on PAGENAME). Also, sometimes the category name is different to the gallery name because of the language rule, e.g. കൊച്ചി. —Matrix(!) ping onewhen replying {user - talk? - uselesscontributions} 17:39, 2 January 2026 (UTC)
Could link be deduced from Wikidata item? If so, Wikidata item should be passed to {{Gallery page}}. EugeneZelenko (talk) 15:18, 3 January 2026 (UTC)
Hmm, there probably is using Template:Data, but I'm not familiar enough with the Lua modules yet. I'll have a go when I have time. —Matrix(!) ping onewhen replying {user - talk? - uselesscontributions} 21:20, 4 January 2026 (UTC)
Thank you for tackling this and happy new year! This is important and the test edits look good.
It would be best if the bot also moved existing {{Gallery page}} templates from the bottom of pages to the top. They should always display at the top.
Many galleries are very outdated and nearly all of them have far fewer files than are available in the category. Most visitors of Commons who aren't active contributors don't immediately know the difference between galleries and categories and know that there also is a category for the subject and how to find it. Often, galleries instead of categories are linked to Wikipedia articles and users may also land there via Web or Commons search. Categories are still not shown on mobile and even if they were, a large fraction of Commons visitors doesn't know that they exist, what they are, and how to find/navigate to them. Prototyperspective (talk) 21:42, 2 January 2026 (UTC)
Please summarise, can this be approved or are there unresolved issues? --Krd 07:36, 12 March 2026 (UTC)

Approved. --Krd 04:55, 22 March 2026 (UTC)