Modul:Súradnice z wikiúdajov
Dokumentácia
Dokumentácia pre tento modul zatiaľ neexistuje. Môžete ju vytvoriť na Modul:Súradnice z wikiúdajov/Dokumentácia
Ak máte otázku k tomuto modulu, alebo potrebujete jeho rozšírenie a neviete ho správne naformátovať, pýtajte sa v diskusii k modulu. Pokiaľ je potrebné modul urgentne opraviť, obráťte sa na technickú podporu.
- Použitie modulu v článkoch.
- Zoznam podstránok tohto modulu.
local p = {}
local myGlobes = {
["Q2"] = "earth",
["Q405"] = "moon"
}
function p.wdata( frame )
if frame.args[1] == "latitude" or frame.args[1] == "longitude" or frame.args[1] == "precision" or frame.args[1] == "dimension" or frame.args[1] == "globe" then
if not mw.wikibase.getEntityObject().claims.P625 then
return nil
else myValue = mw.wikibase.getEntityObject().claims.P625[1].mainsnak.datavalue.value[frame.args[1]]
if frame.args[1] == "globe" then
globeId = mw.ustring.match( myValue, "Q%d+" )
myValue = myGlobes[globeId]
end
return myValue
end
else return nil
end
end
return p