<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.geministation.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AHelper_module</id>
	<title>Module:Helper module - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.geministation.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AHelper_module"/>
	<link rel="alternate" type="text/html" href="https://wiki.geministation.com/index.php?title=Module:Helper_module&amp;action=history"/>
	<updated>2026-06-04T00:48:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.geministation.com/index.php?title=Module:Helper_module&amp;diff=8874&amp;oldid=prev</id>
		<title>Banri at 01:53, 24 March 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.geministation.com/index.php?title=Module:Helper_module&amp;diff=8874&amp;oldid=prev"/>
		<updated>2021-03-24T01:53:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:53, 24 March 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot;&gt;Line 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			reqby = &amp;#039;For a full list of modules using this helper &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[&amp;#039; .. tostring(uri) .. &amp;#039; click here]&amp;lt;/span&amp;gt;\n&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			reqby = &amp;#039;For a full list of modules using this helper &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[&amp;#039; .. tostring(uri) .. &amp;#039; click here]&amp;lt;/span&amp;gt;\n&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		return &#039;This module is a helper module to be used by other modules; it may not designed to be invoked directly. See [[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;RuneScape&lt;/del&gt;:Lua/Helper modules]] for a full list and more information.\n&#039; .. reqby .. tostring(t) .. category&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		return &#039;This module is a helper module to be used by other modules; it may not designed to be invoked directly. See [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;GSWiki&lt;/ins&gt;:Lua/Helper modules]] for a full list and more information.\n&#039; .. reqby .. tostring(t) .. category&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	else&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	else&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		return p._main(args.name, function_list, args.example)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		return p._main(args.name, function_list, args.example)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki_gem-wiki:diff:1.41:old-4137:rev-8874:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Banri</name></author>
	</entry>
	<entry>
		<id>https://wiki.geministation.com/index.php?title=Module:Helper_module&amp;diff=4137&amp;oldid=prev</id>
		<title>Banri: Created page with &quot;-- &lt;nowiki&gt; -- Helps GSWiki:Lua/Helper modules format its table with dynamic documentation -- See Template:Helper module for documentation and usage require(&#039;Module:Mw...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.geministation.com/index.php?title=Module:Helper_module&amp;diff=4137&amp;oldid=prev"/>
		<updated>2020-06-02T06:17:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- &amp;lt;nowiki&amp;gt; -- Helps &lt;a href=&quot;/index.php?title=GSWiki:Lua/Helper_modules&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;GSWiki:Lua/Helper modules (page does not exist)&quot;&gt;GSWiki:Lua/Helper modules&lt;/a&gt; format its table with dynamic documentation -- See &lt;a href=&quot;/Template:Helper_module&quot; title=&quot;Template:Helper module&quot;&gt;Template:Helper module&lt;/a&gt; for documentation and usage require(&amp;#039;Module:Mw...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- &amp;lt;nowiki&amp;gt;&lt;br /&gt;
-- Helps [[GSWiki:Lua/Helper modules]] format its table with dynamic documentation&lt;br /&gt;
-- See [[Template:Helper module]] for documentation and usage&lt;br /&gt;
require(&amp;#039;Module:Mw.html extension&amp;#039;)&lt;br /&gt;
local tooltip = require(&amp;#039;Module:Tooltip&amp;#039;)&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	local function_list = {}&lt;br /&gt;
	-- Let there be no limit to number of parameters&lt;br /&gt;
	local i = 1&lt;br /&gt;
	while args[&amp;#039;fname&amp;#039;..i] do&lt;br /&gt;
		local funcname = args[&amp;#039;fname&amp;#039;..i] or &amp;#039;&amp;#039;&lt;br /&gt;
		local functype = args[&amp;#039;ftype&amp;#039;..i] or &amp;#039;&amp;#039;&lt;br /&gt;
		local funcuse = args[&amp;#039;fuse&amp;#039;..i] or &amp;#039;&amp;#039;&lt;br /&gt;
		function_list[i] = {&lt;br /&gt;
				fname = funcname,&lt;br /&gt;
				ftype = functype,&lt;br /&gt;
				fdesc = funcuse&lt;br /&gt;
		}&lt;br /&gt;
		i = i + 1&lt;br /&gt;
	end&lt;br /&gt;
	local title = mw.title.getCurrentTitle()&lt;br /&gt;
	if title.namespace == 828 and (title.text == args.name or title.text == args.name..&amp;#039;/doc&amp;#039;) then&lt;br /&gt;
		local t = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
		t	:addClass(&amp;#039;wikitable&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Module&amp;#039;):done()&lt;br /&gt;
				:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Function&amp;#039;):done()&lt;br /&gt;
				:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Type&amp;#039;):done()&lt;br /&gt;
				:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Use&amp;#039;):done()&lt;br /&gt;
				:IF(args.example)&lt;br /&gt;
					:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Example&amp;#039;):done()&lt;br /&gt;
				:END()&lt;br /&gt;
			:done()&lt;br /&gt;
			:wikitext(p._main(args.name, function_list, args.example or &amp;#039;no example cell&amp;#039;))&lt;br /&gt;
		local category = &amp;#039;&amp;#039;&lt;br /&gt;
		if not (title.isSubpage and title.subpageText == &amp;#039;doc&amp;#039;) then&lt;br /&gt;
			category = &amp;#039;[[Category:Helper modules]][[Category:Modules required by modules]]&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		local reqby = &amp;#039;&amp;#039;&lt;br /&gt;
		if not (title.isSubpage and title.subpageText == &amp;#039;doc&amp;#039;) then&lt;br /&gt;
			local uri = mw.uri.canonicalUrl(&amp;#039;Special:WhatLinksHere&amp;#039;, &amp;#039;target=Module:&amp;#039;..args.name..&amp;#039;&amp;amp;namespace=828&amp;#039;)&lt;br /&gt;
			reqby = &amp;#039;For a full list of modules using this helper &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[&amp;#039; .. tostring(uri) .. &amp;#039; click here]&amp;lt;/span&amp;gt;\n&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		return &amp;#039;This module is a helper module to be used by other modules; it may not designed to be invoked directly. See [[RuneScape:Lua/Helper modules]] for a full list and more information.\n&amp;#039; .. reqby .. tostring(t) .. category&lt;br /&gt;
	else&lt;br /&gt;
		return p._main(args.name, function_list, args.example)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function formatFuncNames(list)&lt;br /&gt;
	list = mw.text.split(list or &amp;#039;&amp;#039;, &amp;#039;;;&amp;#039;)&lt;br /&gt;
	local res = {}&lt;br /&gt;
&lt;br /&gt;
	for _, v in ipairs(list) do&lt;br /&gt;
		v = mw.text.trim(v)&lt;br /&gt;
		table.insert(res, string.format(&amp;quot;&amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt;&amp;quot;, v))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat(res, &amp;#039;&amp;lt;br&amp;gt;&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(modn, func_list, example)&lt;br /&gt;
	local ret_row = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
					-- Name will group together with all functions once&lt;br /&gt;
					:attr(&amp;#039;rowspan&amp;#039;,#func_list)&lt;br /&gt;
					:wikitext(&amp;#039;[[Module:&amp;#039;..modn..&amp;#039;|&amp;#039;..modn..&amp;#039;]]&amp;#039;)&lt;br /&gt;
				:done()&lt;br /&gt;
				:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
					:wikitext(formatFuncNames(func_list[1].fname))&lt;br /&gt;
				:done()&lt;br /&gt;
				:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
					:wikitext(func_list[1].ftype)&lt;br /&gt;
				:done()&lt;br /&gt;
				:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
					:wikitext(func_list[1].fdesc)&lt;br /&gt;
				:done()&lt;br /&gt;
				:IF(example ~= &amp;#039;no example cell&amp;#039;)&lt;br /&gt;
					:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
						:attr(&amp;#039;rowspan&amp;#039;,#func_list)&lt;br /&gt;
						:IF(example)&lt;br /&gt;
							:wikitext(tostring(tooltip._span{ name = modn, alt = &amp;#039;Click&amp;amp;nbsp;to&amp;amp;nbsp;view&amp;#039;}), tostring(tooltip._div{name = modn, limitwidth = &amp;#039;no&amp;#039;, content = &amp;#039;&amp;lt;br&amp;gt;&amp;#039; .. (example or &amp;#039;&amp;#039;)}))&lt;br /&gt;
						:END()&lt;br /&gt;
					:done()&lt;br /&gt;
				:END()&lt;br /&gt;
			:done()&lt;br /&gt;
	local ret = tostring(ret_row)&lt;br /&gt;
	for i=2,#func_list,1 do&lt;br /&gt;
		local next_row = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
					:wikitext(formatFuncNames(func_list[i].fname))&lt;br /&gt;
				:done()&lt;br /&gt;
				:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
					:wikitext(func_list[i].ftype)&lt;br /&gt;
				:done()&lt;br /&gt;
				:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
					:wikitext(func_list[i].fdesc)&lt;br /&gt;
				:done()&lt;br /&gt;
			:done()&lt;br /&gt;
		ret = ret..tostring(next_row)&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Banri</name></author>
	</entry>
</feed>