Page MenuHomePhabricator

Add tool to write MassMessage to all pages linked to a Wikidata item
Closed, ResolvedPublic

Authored By
Mar 27 2018, 10:21 AM
Referenced Files
"Love" token, awarded by Whatamidoing-WMF."Love" token, awarded by Quiddity."Love" token, awarded by Trizek-WMF."Love" token, awarded by Elitre.


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).


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 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 (Q6811431) but I don't know how to get the list of all these pages, formatted in the way I need for MassMessage.


  • specify one or more items (e. g. Project:Lua (Q6811431), optionally falling back to the generic Project:Village pump (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:

1# {{target|page=Wikipediabespreking:Lua|}}
2# {{target|page=نقاش ويكيبيديا:لوا|}}
3# {{target|page=विकिपीडिया वार्ता:लुआ|}}
4# {{target|page=উইকিপিডিয়া আলোচনা:লুয়া|}}
5# {{target|page=Viquipèdia Discussió:Lua|}}
6# {{target|page=Commons talk:Lua|}}
7# {{target|page=Wikipedia-diskussion:Lua|}}
8# {{target|page=Wikipedia Diskussion:Lua|}}
9# {{target|page=Wikipedija diskusija:Lua|}}
10# {{target|page=Wikipedia talk:Lua|}}
11# {{target|page=Wiktionary talk:Scribunto|}}
12# {{target|page=Vikipedia diskuto:Lua|}}
13# {{target|page=Wikipedia discusión:Lua|}}
14# {{target|page=بحث ویکی‌پدیا:لوآ|}}
15# {{target|page=Keskustelu ohjeesta:Lua|}}
16# {{target|page=Discussion Wikipédia:Lua|}}
17# {{target|page=Conversa Wikipedia:Módulos|}}
18# {{target|page=વિકિપીડિયા ચર્ચા:Lua|}}
19# {{target|page=שיחת ויקיפדיה:לואה|}}
20# {{target|page=Wikipedija diskusija:Lua|}}
21# {{target|page=Wikipédia-vita:Lua|}}
22# {{target|page=Discussion Wikipedia:Modulo|}}
23# {{target|page=Pembicaraan Wikipedia:Lua|}}
24# {{target|page=Wikipedia tungtungan:Lua|}}
25# {{target|page=Discussioni aiuto:Moduli Lua|}}
26# {{target|page=Discussioni aiuto:Moduli|}}
27# {{target|page=Discussioni aiuto:Moduli|}}
28# {{target|page=Discussioni aiuto:Moduli|}}
29# {{target|page=Discussioni aiuto:Moduli|}}
30# {{target|page=Discussioni aiuto:Moduli|}}
31# {{target|page=Wikipedia‐ノート:Lua|}}
32# {{target|page=위키백과토론:루아|}}
33# {{target|page=Gotûbêja Wîkîpediyayê:Lua|}}
34# {{target|page=Vikipēdijas diskusija:Lua|}}
35# {{target|page=विकिपीडिया चर्चा:लुआ|}}
36# {{target|page=Perbincangan Wikipedia:Lua|}}
37# {{target|page=Wikipedia talk:Lua|}}
38# {{target|page=Wikipedia-diskusjon:Lua|}}
39# {{target|page=ଉଇକିପିଡ଼ିଆ ଆଲୋଚନା:ଲୁଆ|}}
40# {{target|page=ਵਿਕੀਪੀਡੀਆ ਗੱਲ-ਬਾਤ:ਸਕਰਿਬੁੰਟੋ|}}
41# {{target|page=Dyskusja Wikipedii:Lua|}}
42# {{target|page=Wikipédia Discussão:Lua|}}
43# {{target|page=Discuție Wikipedia:Lua|}}
44# {{target|page=Обсуждение Викиновостей:Модули|}}
45# {{target|page=Обсуждение Википедии:Модули|}}
46# {{target|page=विकिपीडियासम्भाषणम्:Lua|}}
47# {{target|page=بحث:لُووا|}}
48# {{target|page=Razgovor o Wikipedia:Lua|}}
49# {{target|page=විකිපීඩියා සාකච්ඡාව:Lua|}}
50# {{target|page=Pogovor o Wikipediji:Lua|}}
51# {{target|page=Obrolan Wikipedia:Lua|}}
52# {{target|page=Wikipediadiskussion:Lua|}}
53# {{target|page=คุยเรื่องวิกิพีเดีย:ลูอา|}}
54# {{target|page=Vikipedi tartışma:Lua|}}
55# {{target|page=Wikipedia talk:Lua|}}
56# {{target|page=Extension talk:Scribunto|}}
57# {{target|page=Wikipedia thó-lūn:Lua|}}
58# {{target|page=Wikipedia talk:Lua|}}
59# {{target|page=Wikipedia talk:Lua|}}
60# {{target|page=Уикипедия беседа:Модули|}}

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.

Event Timeline

Thanks for creating the prototype and setting up the ticket. This will be useful for people doing cross-wiki communication (community liaisons, volunteers).

The specifications seem good. I'd support the idea of only generating the list in the first place. Then the user can copy it in a wikipage, and use the MassMessage tool as it is currently.

If possible, it could be nice to have the action of creating a sub-page of the userpage, with the result of the script.

  • I'm logged in on-wiki with my account Lea Lacroix (WMDE)
  • Once I have generated and verified my script, I have an action "copy it in a subpage of my userpage"
  • I can enter the title I want for this page, for example "Lua projects"
  • The page User:Lea Lacroix (WMDE)/Lua projects is created with the result of the script
  • I get a validation that this subpage has been created and a link to it

Note: in the syntax, the slash / needs to be removed at the end of the site url.

@Trizek-WMF @Johan @Quiddity @Keegan Can you have a look, tell us if such a tool would be useful for you, and if you would have extra requirements? :)

Sorry, I completely forgot about that older task (even though I was CCed on it).

I’m not familiar with the technical side of the MassMessage extension… would it make sense to add this to MassMessage itself? The current tool has a lot of wiki-specific overrides ([](, I’m not sure how easy it would be to express that as configuration for the MassMessage extension.

Lucas_Werkmeister_WMDE claimed this task.

I think we can close this task – the tool exists (, and all the features from the task description are available, except for directly sending the MassMessage (optional).

We can discuss over at T171617: Develop a tool for MassMessage users to generate distribution lists from Wikidata project pages whether that task is now also resolved or more should be done.