<?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%2FRexxS%2FPipedCoords</id>
	<title>Module:Sandbox/RexxS/PipedCoords - 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%2FRexxS%2FPipedCoords"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/RexxS/PipedCoords&amp;action=history"/>
	<updated>2026-05-24T02:31:36Z</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/RexxS/PipedCoords&amp;diff=146094&amp;oldid=prev</id>
		<title>imported&gt;RexxS: cheat for &quot;</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/RexxS/PipedCoords&amp;diff=146094&amp;oldid=prev"/>
		<updated>2015-04-08T23:25:56Z</updated>

		<summary type="html">&lt;p&gt;cheat for &amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
-- This is used to get the coordinates of a location (property P625) e.g. 52°31&amp;#039;33&amp;quot;N, 2°4&amp;#039;30&amp;quot;W which is then formatted as 52|31|33|N|2|4|30|W for use in the {{coord}} template&lt;br /&gt;
p.getPipedCoords = function(frame)&lt;br /&gt;
	local propertyID = mw.text.trim(frame.args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
	local input_parm = mw.text.trim(frame.args[2] or &amp;quot;&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	local entity = mw.wikibase.getEntityObject()&lt;br /&gt;
	if entity then&lt;br /&gt;
		claims = entity.claims[&amp;#039;P625&amp;#039;]&lt;br /&gt;
		if claims then&lt;br /&gt;
			local coords = entity:formatPropertyValues(&amp;#039;P625&amp;#039;, mw.wikibase.entity.claimRanks).value&lt;br /&gt;
			-- remove degrees, minutes, seconds - matches (digit, char) three times then N or S, then (digit, char) three times then E or W&lt;br /&gt;
			local result = mw.ustring.gsub(coords, &amp;quot;°&amp;quot;, &amp;quot;|&amp;quot;)&lt;br /&gt;
			local result = mw.ustring.gsub(result, &amp;quot;%p&amp;quot;, &amp;quot;|&amp;quot;)&lt;br /&gt;
			local result = mw.ustring.gsub(result, &amp;quot;||39&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
			local result = mw.ustring.gsub(result, &amp;quot;||34&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
			return result&lt;br /&gt;
		else&lt;br /&gt;
			return &amp;quot;0|0|0|N|0|0|0|W&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;0|0|0|N|0|0|0|W&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;RexxS</name></author>
	</entry>
</feed>