Jump to content

Module:WikiProjects for deletion

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by CX Zoom (talk | contribs) at 19:14, 28 January 2023 (CX Zoom moved page Module:Sandbox/CX Zoom/WPBS 2 to Module:WikiProjects for deletion without leaving a redirect: Move to a more appropriate name). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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