It would be useful to have a tool that emits MassMessage syntax for all pages linked to a certain Wikidata item (typically a project page).
Need:
> I'm a community liaison and I want to share an announcement and reach all the editors across the projects who work on Lua modules. I'd like to send a message to all the wikis having a Project:Lua, on the talk page of this project. For this kind of action I use [[ https://meta.wikimedia.org/wiki/MassMessage | MassMessage ]], that requests a list of pages with a specific format. I know that I can find all the links to Project:Lua in a Wikidata item ([[ https://www.wikidata.org/wiki/Q6811431 | Q6811431 ]]) but I don't know how to get the list of all these pages, formatted in the way I need for MassMessage.
Features:
- specify one or more items (e. g. [Project:Lua (Q6811431)](http://www.wikidata.org/entity/Q6811431), optionally falling back to the generic [Project:Village pump (Q16503)](http://www.wikidata.org/entity/Q16503) for projects that don’t have a specific Lua page)
- optionally, specify a wikigroup to limit to projects in that group (e. g. `wiktionary`)
- optionally, link to talk pages instead of the main page
- either emit MassMessage syntax or directly send the MassMessage – but tbh I would prefer emitting MassMessage so that the sender can verify the page list before sending
For reference, MassMessage syntax looks like this: {P6902}
I originally wrote a query for @Lea_Lacroix_WMDE with just the first two features (P6900 – note that the line breaks in the query output won’t show until T189937, so you have to copy the HTML source), and then more recently a shell script to link to talk pages as well (P6901 – but without wikigroup and multiple items support). It would be nice to have this wrapped in a nice, easy-to-use tool.