local p = local WikidataIB = require("Module:WikidataIB")
-- Code from 'Module:No globals'local mt = getmetatable(_G) or function mt.__index (t, k) if k ~= 'arg' then error('Tried to read nil global ' .. tostring(k), 2) end return nilendfunction mt.__newindex(t, k, v) if k ~= 'arg' then error('Tried to write global ' .. tostring(k), 2) end rawset(t, k, v)endsetmetatable(_G, mt)-- End of code from 'Module:No globals'
function p.getMID return "M" .. mw.title.getCurrentTitle.idend
function p.getFilename return mw.title.getCurrentTitle.nsText .. ':' .. mw.title.getCurrentTitle.textend
function p.getP180vals(frame) local mid = frame.args[1] local prefix = frame.args[2] or local postfix = frame.args[3] or ' ' local text = local tablevals = mw.wikibase.getBestStatements(mid, 'P180') for i, v in ipairs(tablevals) do text = text .. prefix .. v.mainsnak.datavalue.value.id .. postfix end return textend
return p