Module:Sandbox/Xinbenlv/WikiTextFromWikibase

-- Module:WikiLoop local p = {}

function p.getStub mw.log("hello") qid = "Q13406268" lang = 'zh' entity = mw.wikibase.getEntity(qid) return entity:getDescription(lang) end

function p.renderSnak local entity = mw.wikibase.getEntity local snak = entity['claims']['P342'][1]['qualifiers']['P342'][1]

return mw.wikibase.renderSnak( snak ) -- Returns the given Snak value formatted as wikitext escaped plain text. end

return p