Module:RFC

From Guild of Archivists

Documentation for this module may be created at Module:RFC/doc

local p = {}

local function get_namespace(namespace)
	for k, v in pairs( mw.site.namespaces ) do
    	if v == namespace then
    		return k
    	end
	end
	return 'Unknown namespace'
end

function p.metadata(frame)
	local author = frame:callParserFunction{ name = 'REVISIONUSER', args = frame.args[1]}
	--local namespace = get_namespace( frame.args[1] )
	local title = mw.title.makeTitle( frame.args[1], frame.args[2] )
	local wikitext = title:getContent()
	return frame:preprocess( wikitext )
end
return p