Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Test2

From ProleWiki, the proletarian encyclopedia
Revision as of 11:55, 23 April 2024 by Forte (talk | contribs)
function splitLines(text)
    local lines = {}
    for line in text:gmatch("[^\r\n]+") do
        table.insert(lines, line)
    end
    return lines
end

local p = {}

function p.Sitename(frame)
	local extDataTable = mw.ext.externalData.getExternalData(frame.args[1])[1]["__text"]
	local lines = splitLines(extDataTable)
	-- first check for matching "og:site_name"
	-- match("content=\"(%a+)\"") needs to be somewhere
end

return p