<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://splatoonfanon.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lakelimbo</id>
	<title>Splatoon Fanon - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://splatoonfanon.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lakelimbo"/>
	<link rel="alternate" type="text/html" href="https://splatoonfanon.org/wiki/Special:Contributions/Lakelimbo"/>
	<updated>2026-04-30T20:31:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://splatoonfanon.org/w/index.php?title=Module:File&amp;diff=412</id>
		<title>Module:File</title>
		<link rel="alternate" type="text/html" href="https://splatoonfanon.org/w/index.php?title=Module:File&amp;diff=412"/>
		<updated>2025-08-20T15:01:37Z</updated>

		<summary type="html">&lt;p&gt;Lakelimbo: Created page with &amp;quot;-- 	This is an updated version of Inkipedia&amp;#039;s File module, less bloated 	and easier to add features if needed. 	In fact, the way it works might as well be used as a base/generic module for 	other things. --  local license = require(&amp;quot;Module:File/Licenses&amp;quot;)  local f = {} local container = mw.html 	.create(&amp;quot;table&amp;quot;) 	:tag(&amp;quot;tr&amp;quot;) 	:tag(&amp;quot;th&amp;quot;) 	:attr({ 		[&amp;quot;colspan&amp;quot;] = 2 	}) 	:css({ 		[&amp;quot;text-align&amp;quot;] = &amp;quot;center&amp;quot; 	}) 	:wikitext(&amp;quot;File information&amp;quot;) 	:done() 	:done()  ---Will conv...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[&lt;br /&gt;
	This is an updated version of Inkipedia&#039;s File module, less bloated&lt;br /&gt;
	and easier to add features if needed.&lt;br /&gt;
	In fact, the way it works might as well be used as a base/generic module for&lt;br /&gt;
	other things.&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
local license = require(&amp;quot;Module:File/Licenses&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
local f = {}&lt;br /&gt;
local container = mw.html&lt;br /&gt;
	.create(&amp;quot;table&amp;quot;)&lt;br /&gt;
	:tag(&amp;quot;tr&amp;quot;)&lt;br /&gt;
	:tag(&amp;quot;th&amp;quot;)&lt;br /&gt;
	:attr({&lt;br /&gt;
		[&amp;quot;colspan&amp;quot;] = 2&lt;br /&gt;
	})&lt;br /&gt;
	:css({&lt;br /&gt;
		[&amp;quot;text-align&amp;quot;] = &amp;quot;center&amp;quot;&lt;br /&gt;
	})&lt;br /&gt;
	:wikitext(&amp;quot;File information&amp;quot;)&lt;br /&gt;
	:done()&lt;br /&gt;
	:done()&lt;br /&gt;
&lt;br /&gt;
---Will convert a string with some delimiter into an iterable array,&lt;br /&gt;
---trimming spaces as well.&lt;br /&gt;
---The default delimiter is a comma (`&amp;quot;,%s*&amp;quot;`), but it&#039;s possible to&lt;br /&gt;
---change to something else.&lt;br /&gt;
---&lt;br /&gt;
---Examples:&lt;br /&gt;
---		&amp;quot;foo,bar,baz&amp;quot;			-&amp;gt; { &amp;quot;foo&amp;quot;, &amp;quot;bar&amp;quot;, &amp;quot;baz&amp;quot; }&lt;br /&gt;
---		&amp;quot;green, Yellow   ,Blue&amp;quot;	-&amp;gt; { &amp;quot;green&amp;quot;, &amp;quot;yellow&amp;quot;, &amp;quot;blue&amp;quot; }&lt;br /&gt;
---&lt;br /&gt;
---@param str string&lt;br /&gt;
---@param delimiter string&lt;br /&gt;
---@return string[]&lt;br /&gt;
local function array_from_string(str, delimiter)&lt;br /&gt;
  delimiter = delimiter or &amp;quot;,%s*&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  if not str or #str == 0 then&lt;br /&gt;
    return nil&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  local result = {}&lt;br /&gt;
  local parts = mw.text.split(str, delimiter)&lt;br /&gt;
  &lt;br /&gt;
  for _, s in ipairs(parts) do&lt;br /&gt;
    table.insert(result, mw.text.trim(s))&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  return result&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---Creates a row for an HTML table.&lt;br /&gt;
---Alongside with `rows.list()` down below, if it notices it&#039;s a one-dimensional&lt;br /&gt;
---table (array), likely from `array_from_string()`, it will split each element&lt;br /&gt;
---and add an appropriate space and comma to it.&lt;br /&gt;
---&lt;br /&gt;
---@param name string&lt;br /&gt;
---@content string | string[]&lt;br /&gt;
---@return table&lt;br /&gt;
local function table_row(name, content)&lt;br /&gt;
	local row = container&lt;br /&gt;
		:tag(&amp;quot;tr&amp;quot;)&lt;br /&gt;
		:tag(&amp;quot;th&amp;quot;)&lt;br /&gt;
		:wikitext(name)&lt;br /&gt;
		:done()&lt;br /&gt;
		:tag(&amp;quot;td&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	if type(content) == &amp;quot;table&amp;quot; then&lt;br /&gt;
		for k, v in ipairs(content) do&lt;br /&gt;
			if k == #content then&lt;br /&gt;
				row:wikitext(v)&lt;br /&gt;
			else&lt;br /&gt;
				row:wikitext(v .. &amp;quot;, &amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		row:wikitext(content)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	row:done()&lt;br /&gt;
	return row&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---Error message for some elements, if needed.&lt;br /&gt;
---&lt;br /&gt;
---@type message&lt;br /&gt;
---@return string&lt;br /&gt;
local function error_message(message)&lt;br /&gt;
	local span = mw.html.create(&amp;quot;span&amp;quot;)&lt;br /&gt;
		:css({&lt;br /&gt;
			[&amp;quot;color&amp;quot;] = &amp;quot;red&amp;quot;,&lt;br /&gt;
		})&lt;br /&gt;
		:wikitext(message)&lt;br /&gt;
		:done()&lt;br /&gt;
		&lt;br /&gt;
	return tostring(span)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---The list of elements to create a row.&lt;br /&gt;
---You can add any custom items with your own logic, as long as it returns&lt;br /&gt;
---`table_row()`.&lt;br /&gt;
---Even though on MW it&#039;s not necessary, it&#039;s good to adapt the parameter types&lt;br /&gt;
---if you happen to need something different other than args that have string&lt;br /&gt;
---values (e.g: `table&amp;lt;string, string | number&amp;gt;`).&lt;br /&gt;
---&lt;br /&gt;
---@type table&amp;lt;string, fun(content: string, args: table&amp;lt;string, string&amp;gt;)&amp;gt;&lt;br /&gt;
---@return table&lt;br /&gt;
local rows = {&lt;br /&gt;
    list = function(content, args)&lt;br /&gt;
        local lists = array_from_string(content)&lt;br /&gt;
        &lt;br /&gt;
        if not lists or #lists == 0 then&lt;br /&gt;
            return table_row(args.name, error_message(args.error))&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        for _, list in ipairs(lists) do&lt;br /&gt;
            container:wikitext(&amp;quot;[[Category:&amp;quot; .. list .. &amp;quot; files]]&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        return table_row(args.name, lists)&lt;br /&gt;
    end,&lt;br /&gt;
	text = function(content, args)&lt;br /&gt;
		local error = args.error or &amp;quot;Not provided&amp;quot;&lt;br /&gt;
		&lt;br /&gt;
		if not content or content == &amp;quot;&amp;quot; then&lt;br /&gt;
			content = &amp;quot;&#039;&#039;&amp;quot; .. error .. &amp;quot;&#039;&#039;&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		table_row(args.name, content)&lt;br /&gt;
	end,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function f.main(frame)&lt;br /&gt;
	local param = frame.args&lt;br /&gt;
	&lt;br /&gt;
    rows.list(param.work, { name = &amp;quot;Work&amp;quot;, error = &amp;quot;ERROR: invalid or empty work&amp;quot; })&lt;br /&gt;
    rows.text(param.description, { name =&amp;quot;Description&amp;quot; })&lt;br /&gt;
    rows.list(param.author, { name = &amp;quot;Author&amp;quot;, error = &amp;quot;ERROR: invalid author&amp;quot; })&lt;br /&gt;
    rows.list(param.characters, { name = &amp;quot;Characters&amp;quot;, error = &amp;quot;ERROR: invalid character&amp;quot; })&lt;br /&gt;
    rows.text(param.source, { name = &amp;quot;Source&amp;quot; })&lt;br /&gt;
    rows.text(license.get_license(param.license), { name = &amp;quot;License&amp;quot; })&lt;br /&gt;
    &lt;br /&gt;
    return tostring(container)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return f&lt;/div&gt;</summary>
		<author><name>Lakelimbo</name></author>
	</entry>
	<entry>
		<id>https://splatoonfanon.org/w/index.php?title=Module:File/Licenses&amp;diff=411</id>
		<title>Module:File/Licenses</title>
		<link rel="alternate" type="text/html" href="https://splatoonfanon.org/w/index.php?title=Module:File/Licenses&amp;diff=411"/>
		<updated>2025-08-20T15:01:07Z</updated>

		<summary type="html">&lt;p&gt;Lakelimbo: Created page with &amp;quot;local l = {}  ---The list of licenses. ---As you may see below (on the `l.get_license()` function), the key NEEDS to ---not have spaces, dashes, dots, or underscores. --- ---@type table&amp;lt;string, string&amp;gt; local licenses = { 	ccbysa10 = &amp;quot;&amp;#039;&amp;#039;This file is distributed under the &amp;#039;&amp;#039;&amp;#039;[https://creativecommons.org/licenses/by-sa/1.0/deed.en Creative Commons Attribution-ShareAlike 1.0]&amp;#039;&amp;#039;&amp;#039; license.&amp;#039;&amp;#039;Category:Media licensed under CC BY-SA 1.0&amp;quot;, 	ccby20 = &amp;quot;&amp;#039;&amp;#039;This file is distributed...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local l = {}&lt;br /&gt;
&lt;br /&gt;
---The list of licenses.&lt;br /&gt;
---As you may see below (on the `l.get_license()` function), the key NEEDS to&lt;br /&gt;
---not have spaces, dashes, dots, or underscores.&lt;br /&gt;
---&lt;br /&gt;
---@type table&amp;lt;string, string&amp;gt;&lt;br /&gt;
local licenses = {&lt;br /&gt;
	ccbysa10 = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[https://creativecommons.org/licenses/by-sa/1.0/deed.en Creative Commons Attribution-ShareAlike 1.0]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY-SA 1.0]]&amp;quot;,&lt;br /&gt;
	ccby20 = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[https://creativecommons.org/licenses/by/2.0/deed.en Creative Commons Attribution 2.0]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY-SA 2.0]]&amp;quot;,&lt;br /&gt;
	ccbysa21jp = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[https://creativecommons.org/licenses/by-sa/2.1/jp/deed.en Creative Commons Attribution-ShareAlike 2.1 Japan]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY-SA 2.1]]&amp;quot;,&lt;br /&gt;
	ccby25 = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[http://creativecommons.org/licenses/by/2.5/deed.en Creative Commons Attribution 2.5]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY 2.5]]&amp;quot;,&lt;br /&gt;
	ccbysa25 = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[https://creativecommons.org/licenses/by-sa/2.5/deed.en Creative Commons Attribution-ShareAlike 2.5]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY-SA 2.5]]&amp;quot;,&lt;br /&gt;
	ccby30 = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[https://creativecommons.org/licenses/by/3.0/deed.en Creative Commons Attribution 3.0]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY 3.0]]&amp;quot;,&lt;br /&gt;
	ccbync30 = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[https://creativecommons.org/licenses/by-nc/3.0/ Creative Commons Attribution Non-Commercial 3.0]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY-NC 3.0]]&amp;quot;,&lt;br /&gt;
	ccbyncsa30 = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[https://creativecommons.org/licenses/by-nc-sa/3.0/ Creative Commons Attribution Non-Commercial 3.0]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY-NC-SA 3.0]]&amp;quot;,&lt;br /&gt;
	ccbysa30 = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[https://creativecommons.org/licenses/by-sa/3.0/deed.en Creative Commons Attribution-ShareAlike 3.0]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY-SA 3.0]]&amp;quot;,&lt;br /&gt;
	ccby40 = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[https://creativecommons.org/licenses/by/4.0/deed.en Creative Commons Attribution 4.0]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY 4.0]]&amp;quot;,&lt;br /&gt;
	ccbysa40 = &amp;quot;&#039;&#039;This file is distributed under the &#039;&#039;&#039;[https://creativecommons.org/licenses/by-sa/4.0/deed.en Creative Commons Attribution-ShareAlike 4.0]&#039;&#039;&#039; license.&#039;&#039;[[Category:Media licensed under CC BY-SA 4.0]]&amp;quot;,&lt;br /&gt;
	lgpl = &amp;quot;This library is free software; you can redistribute it and/or modify it under the terms of the &#039;&#039;&#039;[[wikipedia:GNU Lesser General Public License|GNU Lesser General Public License]]&#039;&#039;&#039; as published by the [[wikipedia:Free Software Foundation|Free Software Foundation]]; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See [http://www.gnu.org/licenses/lgpl.html the GNU Lesser General Public License] for more details.&amp;quot;,&lt;br /&gt;
	pd = &amp;quot;&#039;&#039;This file has been released into the &#039;&#039;&#039;[[Wikipedia:Public domain|public domain]]&#039;&#039;&#039; by the copyright holder, its copyright has expired, or it is ineligible for copyright. This applies worldwide.&#039;&#039;[[Category:Media released to public domain]]&amp;quot;,&lt;br /&gt;
	pds = &amp;quot;&#039;&#039;This file has been released into the &#039;&#039;&#039;[[Wikipedia:Public domain|public domain]]&#039;&#039;&#039; by the uploading user. This applies worldwide.&#039;&#039;[[Category:Media released to public domain]]&amp;quot;,&lt;br /&gt;
	fairuse = &amp;quot;&#039;&#039;This file is subject to [[Inkipedia:Copyrights|copyright]]. Copyright is most likely held by the company that published the game or the media portrayed. Inkipedia&#039;s use of this work qualifies as &#039;&#039;&#039;fair use&#039;&#039;&#039; under &#039;&#039;&#039;[[Wikipedia:Fair use#U.S. fair use factors|United States copyright law]]&#039;&#039;&#039;, or the author&#039;s permission is given. It is used on the wiki only in the belief that the information the file portrays is designed to be an accompaniment to playing the game or media, and its use here will not:&#039;&#039;&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;Detract from the experience of playing the game or using the media in question.&#039;&#039;&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;Harm the author&#039;s sales or reputation.&#039;&#039;&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;[[Category:Media assumed fair use]]&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
---Because licenses are important, the idea here is to prevent as much as possible&lt;br /&gt;
---any spacing issues, dashes, underscores, among others, when typing the license&lt;br /&gt;
---name.&lt;br /&gt;
---&lt;br /&gt;
---Examples:&lt;br /&gt;
---		&amp;quot;cc-by-sa&amp;quot;	-&amp;gt; &amp;quot;ccbysa&amp;quot;&lt;br /&gt;
---		&amp;quot;fair use&amp;quot;	-&amp;gt; &amp;quot;fairuse&amp;quot;&lt;br /&gt;
---		&amp;quot;LGp_l&amp;quot;		-&amp;gt; &amp;quot;lgpl&amp;quot;&lt;br /&gt;
---		&amp;quot;cc BY-4.0&amp;quot;	-&amp;gt; &amp;quot;ccby40&amp;quot;&lt;br /&gt;
---&lt;br /&gt;
---@param input string&lt;br /&gt;
---@return string | nil&lt;br /&gt;
function l.get_license(input)&lt;br /&gt;
	if not input then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local license = input:lower():gsub(&amp;quot;[^%w]&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	 &lt;br /&gt;
	return licenses[input]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return l&lt;/div&gt;</summary>
		<author><name>Lakelimbo</name></author>
	</entry>
</feed>