Module:WikiProjects for deletion
Appearance
Usage
{{#invoke:WikiProjects for deletion|main}}
returns only the transclusions that have "WikiProject" in its name.{{#invoke:WikiProjects for deletion|main|number=yes}}
returns the number of such transclusions.
You can also find its live usage at Wikipedia:Miscellany for deletion/WikiProjects.
local A = {}
function A.main( frame )
local content = mw.title.new ("Wikipedia:Miscellany for deletion"):getContent();
local temps = {}
local mfd = {}
local i = 1
local store = {}
for t in string.gmatch(content, "{{(.-)}}") do
temps[i] = mw.text.trim(t)
if string.find(temps[i], "WikiProject") then
mfd[i] = temps[i]
end
if (mfd[i] ~= nil) and (mfd[i] ~= "") then
table.insert (store, table.concat ({'\n' .. frame:expandTemplate{ title = mfd[i] }}));
end
i = i + 1
end
return table.concat (store)
end
return A