The cached output of the various MediaWiki query pages like Special:UnusedTemplates, Special:GadgetUsage, etc should be exposed to lua. The Action API already exposes these through action=query&list=querypage so the data is already available in a machine-readable format.
Quoting from https://blog.bawolff.net/2024/01/imagining-future-mediawiki.html:
Results [of querying] should be usable for futher processing
e.g. You should be able to use the result inside a lua module and format it in arbitrary ways
Use case(s)
- Combined with the editnotice or PageNotice systems, this could be used on JS/CSS pages to notify viewers/editors of the number of users loading the page (via data from GadgetUsage).
- ...