<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2Fshreyasminocha%2FWikidata</id>
	<title>Module:Sandbox/shreyasminocha/Wikidata - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2Fshreyasminocha%2FWikidata"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/shreyasminocha/Wikidata&amp;action=history"/>
	<updated>2026-05-26T02:53:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/shreyasminocha/Wikidata&amp;diff=146587&amp;oldid=prev</id>
		<title>imported&gt;ShreyasMinocha at 16:50, 10 December 2018</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/shreyasminocha/Wikidata&amp;diff=146587&amp;oldid=prev"/>
		<updated>2018-12-10T16:50:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {} -- p stands for package&lt;br /&gt;
&lt;br /&gt;
function p.prop( frame )&lt;br /&gt;
	local entityId = frame.args.entityId&lt;br /&gt;
	local propertyId = frame.args.propertyId&lt;br /&gt;
	local data = mw.wikibase.getBestStatements(entityId, propertyId)&lt;br /&gt;
	local out = {}&lt;br /&gt;
	&lt;br /&gt;
	for key, val in pairs(data) do&lt;br /&gt;
		local id = val.mainsnak.datavalue.value.id&lt;br /&gt;
		local label = mw.wikibase.getLabel(id)&lt;br /&gt;
		local sitelink = mw.wikibase.getSitelink(id)&lt;br /&gt;
		local sitelinkNoDisamb = sitelink&lt;br /&gt;
		&lt;br /&gt;
		local sitelinkDisambParen = string.find(sitelink or label, &amp;#039;%(&amp;#039;)&lt;br /&gt;
		&lt;br /&gt;
		if sitelinkDisambParen ~= nil then&lt;br /&gt;
			sitelinkNoDisamb = string.sub(sitelink or label, 1, sitelinkDisambParen - 1 - 1)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if sitelink == nil then&lt;br /&gt;
	    	table.insert(out, label)&lt;br /&gt;
	    else&lt;br /&gt;
	    	table.insert(out, &amp;quot;[[&amp;quot; .. sitelink .. &amp;quot;|&amp;quot; .. sitelinkNoDisamb .. &amp;quot;]]&amp;quot;)&lt;br /&gt;
	    end		&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return table.concat(out, &amp;quot;&amp;lt;br&amp;gt;&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;ShreyasMinocha</name></author>
	</entry>
</feed>