<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://ephemeralfilm.info/a/Module:Type_in_location/history?feed=atom</id>
	<title>Module:Type in location - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://ephemeralfilm.info/a/Module:Type_in_location/history?feed=atom"/>
	<link rel="alternate" type="text/html" href="http://ephemeralfilm.info/a/Module:Type_in_location/history"/>
	<updated>2026-04-14T10:52:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>http://ephemeralfilm.info/index.php?title=Module:Type_in_location&amp;diff=36433&amp;oldid=prev</id>
		<title>JJR: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://ephemeralfilm.info/index.php?title=Module:Type_in_location&amp;diff=36433&amp;oldid=prev"/>
		<updated>2022-03-21T01:33:47Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:33, 21 March 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>JJR</name></author>
	</entry>
	<entry>
		<id>http://ephemeralfilm.info/index.php?title=Module:Type_in_location&amp;diff=36432&amp;oldid=prev</id>
		<title>w&gt;Jonesey95: upper-case the first character of the short description per WP:SDFORMAT. Some code copied from :Module:Settlement short description</title>
		<link rel="alternate" type="text/html" href="http://ephemeralfilm.info/index.php?title=Module:Type_in_location&amp;diff=36432&amp;oldid=prev"/>
		<updated>2022-01-31T22:29:20Z</updated>

		<summary type="html">&lt;p&gt;upper-case the first character of the short description per &lt;a href=&quot;/a/WP:SDFORMAT/edit?redlink=1&quot; class=&quot;new&quot; title=&quot;WP:SDFORMAT (page does not exist)&quot;&gt;WP:SDFORMAT&lt;/a&gt;. Some code copied from &lt;a href=&quot;/a/Module:Settlement_short_description&quot; title=&quot;Module:Settlement short description&quot;&gt;Module:Settlement short description&lt;/a&gt;&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;
local plaintext = require(&amp;quot;Module:Plain text&amp;quot;)._main&lt;br /&gt;
local language = mw.language.getContentLanguage()&lt;br /&gt;
&lt;br /&gt;
--Cleanup/format location for use in short descriptions&lt;br /&gt;
function p.prepareLoc (frame)&lt;br /&gt;
	return p._prepareLoc (frame.args[1])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._prepareLoc (text)&lt;br /&gt;
	text = plaintext(text)&lt;br /&gt;
	text = text..&amp;#039;,&amp;#039; --comma at the end makes things convenient&lt;br /&gt;
	text = text:gsub(&amp;#039;%b()&amp;#039;, &amp;#039;, &amp;#039;) --remove things in brackets as extraneous information&lt;br /&gt;
			   :gsub(&amp;#039;[^%s,]*%d[^%s,]*&amp;#039;, &amp;#039;&amp;#039;) --remove things with digits as generally being unnecessary postal codes/road numbers etc&lt;br /&gt;
			   :gsub(&amp;#039;(,%s-),&amp;#039;, &amp;#039;%1&amp;#039;) --fix possible blank separated commas from previous cleanup&lt;br /&gt;
			   :gsub(&amp;#039;%s%s&amp;#039;, &amp;#039; &amp;#039;) --fix possible extra spaces from previous cleanup&lt;br /&gt;
			   :gsub(&amp;#039;^[%s,]*&amp;#039;, &amp;#039;&amp;#039;) --trim commas and spaces from beginning&lt;br /&gt;
			   :gsub(&amp;#039;[%s,]*$&amp;#039;, &amp;#039;&amp;#039;) --trim commas and spaces from end&lt;br /&gt;
	return text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Gets general location from more specific one for short descriptions&lt;br /&gt;
--i.e if a location is specified to be &amp;quot;P. Sherman 42 Wallaby Way Sydney, Australia&amp;quot;, return &amp;quot;Sydney, Australia&amp;quot;&lt;br /&gt;
--splits by commas and returns last two entries&lt;br /&gt;
&lt;br /&gt;
function p.generalLoc (frame)&lt;br /&gt;
	return p._generalLoc (frame.args[1])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._generalLoc (loc)&lt;br /&gt;
	loc = p._prepareLoc(loc)&lt;br /&gt;
	split = {}&lt;br /&gt;
	num = 0&lt;br /&gt;
	loc = loc..&amp;#039;,&amp;#039; --comma at the end for convenient splitting with gmatch&lt;br /&gt;
	for k in loc:gmatch(&amp;#039;([^,]*),&amp;#039;) do --split by commas&lt;br /&gt;
		table.insert(split, k)&lt;br /&gt;
		num = num + 1&lt;br /&gt;
	end&lt;br /&gt;
	if num == 1 then --if only comma was the one at the end return the whole thing&lt;br /&gt;
		return split[1]&lt;br /&gt;
	else&lt;br /&gt;
		return split[num-1]..&amp;#039;,&amp;#039;..split[num] --return last two entries separated by commas&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--validate type parameter&lt;br /&gt;
function p.validateTyp (typ, args)&lt;br /&gt;
	checkpatterns = args[&amp;#039;check-patterns&amp;#039;]&lt;br /&gt;
	invalidadd = args.invalidadd&lt;br /&gt;
	if checkpatterns then&lt;br /&gt;
		for k in (checkpatterns..&amp;#039;;&amp;#039;):gmatch(&amp;#039;([^;]*);&amp;#039;) do --split checkpatterns by ;, check if one of the patterns is in type&lt;br /&gt;
			if typ:match(k) then return typ end&lt;br /&gt;
		end&lt;br /&gt;
		if invalidadd then --if invalid, add to make it valid&lt;br /&gt;
			return typ..&amp;#039; &amp;#039;..invalidadd&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		return typ&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--generates type in location&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs (frame, {frameOnly = true})&lt;br /&gt;
	return p._main(args, frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Display short description using {{short description}}&lt;br /&gt;
function p.shortdesc(text, frame)&lt;br /&gt;
	return frame:expandTemplate{title = &amp;#039;Short description&amp;#039;, args = {text, &amp;#039;noreplace&amp;#039;}}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main (args, frame)&lt;br /&gt;
	cleanupLoc = require(&amp;#039;Module:Settlement short description&amp;#039;).cleanupLoc&lt;br /&gt;
	typ = args[1]&lt;br /&gt;
	if typ then typ = plaintext(args[1]) end&lt;br /&gt;
	if not typ then return end --check after plaintexting if typ exists&lt;br /&gt;
	sep = ((args.sep == &amp;#039;no&amp;#039;) and &amp;#039;&amp;#039;) or args.sep or &amp;#039; in &amp;#039; --if args.sep set to no, nothing between typ and loc, if it has other value put that&lt;br /&gt;
	local loc = args[2]&lt;br /&gt;
	if args[&amp;#039;full-loc&amp;#039;] then func = &amp;#039;_prepareLoc&amp;#039; else func =  &amp;#039;_generalLoc&amp;#039; end&lt;br /&gt;
	if loc then&lt;br /&gt;
		loc = p[func](loc)&lt;br /&gt;
		loc = cleanupLoc (loc)&lt;br /&gt;
		if loc then loc =  sep..loc else loc = &amp;quot;&amp;quot; end&lt;br /&gt;
	else&lt;br /&gt;
		loc = &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	typ = p.validateTyp (typ, args)&lt;br /&gt;
	if typ then return p.shortdesc(language:ucfirst(typ..loc), frame) end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>w&gt;Jonesey95</name></author>
	</entry>
</feed>