Baka gusto mong gumawa ng pahina ng dokumentasyon para sa Scribunto module na ito. Pwedeng mag-eksperimento ang mga patnugot sa pahina ng sandbox (gumawa | mirror) at testcases (gumawa) ng padron na ito. Magdagdag po ng mga kategorya sa subpage ng /doc. Mga subpage ng module.
---------- Module:Wikibase ----------------require('strict')localp={}-- Return the entity ID of the item linked to the current page.functionp.id(frame)ifnotmw.wikibasethenreturn"no mw.wikibase"endreturnmw.wikibase.getEntityIdForCurrentPage()or"no entity"end-- Return the URL of an entity given its entity ID-- or the item linked to the current page if no argument is provided.functionp.wdurl(frame)returnmw.wikibase.getEntityUrl(frame.args[1]andmw.text.trim(frame.args[1]))-- defaults to entity URL of the item linked to the current pageend-- Return the label of an entity given its entity ID-- or the item linked to the current page if no argument is provided.functionp.label(frame)returnmw.wikibase.getLabel(frame.args[1]andmw.text.trim(frame.args[1]))-- defaults to label of the item linked to the current pageend-- Return the description of an entity given its entity ID-- or the item linked to the current page if no argument is provided.functionp.description(frame)returnmw.wikibase.getDescription(frame.args[1]andmw.text.trim(frame.args[1]))-- defaults to description of the item linked to the current pageend-- Return the local title of an item given its entity ID-- or the item linked to the current page if no argument is provided.functionp.page(frame)localqid=frame.args[1]andmw.text.trim(frame.args[1])ifnotqidorqid==''thenqid=mw.wikibase.getEntityIdForCurrentPage()-- default the item connected to the current pageendreturnmw.wikibase.getSitelink(qidor'')-- requires one string argend-- Return the data type of a property given its entity ID.functionp.datatype(frame)localprop=mw.wikibase.getEntity(frame.args[1]andmw.text.trim(frame.args[1]):upper():gsub('PROPERTY:P','P'))-- trim and remove any "Property:" prefixreturnpropandprop.datatypeendreturnp