<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://culturaitaliana.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ASmall_scan_link</id>
	<title>Module:Small scan link - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://culturaitaliana.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ASmall_scan_link"/>
	<link rel="alternate" type="text/html" href="https://culturaitaliana.org/w/index.php?title=Module:Small_scan_link&amp;action=history"/>
	<updated>2026-04-30T17:57:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://culturaitaliana.org/w/index.php?title=Module:Small_scan_link&amp;diff=8494&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://culturaitaliana.org/w/index.php?title=Module:Small_scan_link&amp;diff=8494&amp;oldid=prev"/>
		<updated>2020-11-05T20:22:51Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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 20:22, 5 November 2020&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>Admin</name></author>
	</entry>
	<entry>
		<id>https://culturaitaliana.org/w/index.php?title=Module:Small_scan_link&amp;diff=8493&amp;oldid=prev</id>
		<title>en&gt;Inductiveload: Created page with &quot;local p = {} --p stands for package  -- simple function to make a link to a give index page local function index_link(index, display) 	return &quot;[[&quot; .. &quot;Index:&quot; .. index .. &quot;|&quot;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://culturaitaliana.org/w/index.php?title=Module:Small_scan_link&amp;diff=8493&amp;oldid=prev"/>
		<updated>2020-09-08T16:30:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {} --p stands for package  -- simple function to make a link to a give index page local function index_link(index, display) 	return &amp;quot;[[&amp;quot; .. &amp;quot;Index:&amp;quot; .. index .. &amp;quot;|&amp;quot;...&amp;quot;&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;
-- simple function to make a link to a give index page&lt;br /&gt;
local function index_link(index, display)&lt;br /&gt;
	return &amp;quot;[[&amp;quot; .. &amp;quot;Index:&amp;quot; .. index .. &amp;quot;|&amp;quot; .. display .. &amp;quot;]]&amp;quot;	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- get the n'th link in the args, inclusing name if given&lt;br /&gt;
local function get_link(args, n)&lt;br /&gt;
	local display = n&lt;br /&gt;
	local argname = 'name' .. n&lt;br /&gt;
	if args[argname] ~= nil then&lt;br /&gt;
		display = args[argname]&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return index_link(args[n], display)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[=[&lt;br /&gt;
Return a formatted small scan link&lt;br /&gt;
Args:&lt;br /&gt;
   1,2,3....        : The index pages to link to&lt;br /&gt;
   name1, name2, ...: Display text for corresponding index page&lt;br /&gt;
]=]&lt;br /&gt;
function p.small_scan_link( frame )&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	&lt;br /&gt;
	local s = ''&lt;br /&gt;
&lt;br /&gt;
	if args[1] == nil then&lt;br /&gt;
		error(&amp;quot;At least an Index page is required&amp;quot;, 0) 	&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args[2] == nil then&lt;br /&gt;
		-- single argument&lt;br /&gt;
&lt;br /&gt;
		local target = args[1]&lt;br /&gt;
		local link_text = &amp;quot;&amp;quot;&lt;br /&gt;
		-- use the provided name if there is one&lt;br /&gt;
		if args['name1'] ~= nil then&lt;br /&gt;
			link_text = args['name1']&lt;br /&gt;
		else&lt;br /&gt;
			-- name based on existance of target&lt;br /&gt;
			if mw.title.new(&amp;quot;Index:&amp;quot; .. target).exists then&lt;br /&gt;
				link_text = &amp;quot;transcription project&amp;quot;&lt;br /&gt;
			else&lt;br /&gt;
				link_text = &amp;quot;start transcription&amp;quot;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		s = index_link(target, link_text)&lt;br /&gt;
	else&lt;br /&gt;
		-- multiple positional args&lt;br /&gt;
&lt;br /&gt;
		local i = 1&lt;br /&gt;
		s = &amp;quot;transcription volumes: &amp;quot;&lt;br /&gt;
		-- iterate positional parameters&lt;br /&gt;
		while args[i] ~= nil do&lt;br /&gt;
			s = s .. get_link(args, i)&lt;br /&gt;
			i = i + 1&lt;br /&gt;
			&lt;br /&gt;
			if args[i] ~= nil then&lt;br /&gt;
				s = s .. &amp;quot;, &amp;quot;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return &amp;quot;&amp;lt;span class=\&amp;quot;scanlink\&amp;quot; style=\&amp;quot;font-size: 83%;\&amp;quot;&amp;gt;(&amp;quot; .. s .. &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>en&gt;Inductiveload</name></author>
	</entry>
</feed>