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 ----------------localp={}-- Return the item ID of the item linked to the current page.functionp.id(frame)ifnotmw.wikibasethenreturn"no mw.wikibase"endentity=mw.wikibase.getEntityObject()ifentity==nilthenreturn"no entity"endreturnentity.idend-- Return the WD entity URL of a given data item, or of connected page-- if no argument is provided to this method.functionp.wdurl(frame)ifframe.args[1]==nilthenentity=mw.wikibase.getEntityObject()ifnotentitythenreturnnilendid=entity.idelseid=mw.text.trim(frame.args[1])endreturnmw.wikibase.getEntityUrl(id)end-- Return the label of a given data item, or of connected page-- if no argument is provided to this method.functionp.label(frame)ifframe.args[1]==nilthenentity=mw.wikibase.getEntityObject()ifnotentitythenreturnnilendid=entity.idelseid=mw.text.trim(frame.args[1])endreturnmw.wikibase.label(id)end-- Return the description of a given data item, or of connected page-- if no argument is provided to this method.functionp.description(frame)ifframe.args[1]==nilthenentity=mw.wikibase.getEntityObject()ifnotentitythenreturnnilendid=entity.idelseid=mw.text.trim(frame.args[1])endreturnmw.wikibase.description(id)end-- Return the local page about a given data item, or of connected page-- if id is not specified.functionp.page(frame)ifframe.args[1]==nilthenentity=mw.wikibase.getEntityObject()ifnotentitythenreturnnilendid=entity.idelseid=mw.text.trim(frame.args[1])endreturnmw.wikibase.sitelink(id)end-- Return the data type of a propertyfunctionp.datatype(frame)ifframe.args[1]andstring.find(frame.args[1],"Property:P")thenifmw.wikibase.getEntityObject(string.gsub(frame.args[1],"Property:P","P"))thenreturnmw.wikibase.getEntityObject(string.gsub(frame.args[1],"Property:P","P")).datatypeendelseifframe.args[1]andstring.find(frame.args[1],"P")thenifmw.wikibase.getEntityObject(frame.args[1])thenreturnmw.wikibase.getEntityObject(frame.args[1]).datatypeendendendreturnp