<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ARfD_close</id>
	<title>Module:RfD close - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ARfD_close"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:RfD_close&amp;action=history"/>
	<updated>2026-06-20T23:09:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://mywikibiz.com/index.php?title=Module:RfD_close&amp;diff=479135&amp;oldid=prev</id>
		<title>Zoran: Pywikibot 6.4.0</title>
		<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:RfD_close&amp;diff=479135&amp;oldid=prev"/>
		<updated>2021-07-16T05:39:14Z</updated>

		<summary type="html">&lt;p&gt;Pywikibot 6.4.0&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local rfd = {}&lt;br /&gt;
&lt;br /&gt;
function rfd.rfdt_before_result(frame) --this bit creates the &amp;quot;closed discussion&amp;quot; notice&lt;br /&gt;
	--define function to check whether arguments are defined&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
&lt;br /&gt;
	local function argIsSet(key)&lt;br /&gt;
		if args[key] and args[key]:find('%S') then&lt;br /&gt;
			return true&lt;br /&gt;
		else&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local function match_result(result_parameter) --takes string as input, spews two strings as output&lt;br /&gt;
			&lt;br /&gt;
		local find_count = 0&lt;br /&gt;
		&lt;br /&gt;
		local result_match = ''&lt;br /&gt;
		local icon_filename = ''&lt;br /&gt;
		&lt;br /&gt;
		local parameter_lower = result_parameter:lower()&lt;br /&gt;
		&lt;br /&gt;
		--I thought about using an array and a for-loop, but the logic is &lt;br /&gt;
		--sufficiently complicated (there is no built-in &amp;quot;or&amp;quot; in Lua string &lt;br /&gt;
		--patterns) so I'll just lay it flat.&lt;br /&gt;
		if (parameter_lower:find('keep') or parameter_lower:find('withdraw') or parameter_lower:find('refine')) then&lt;br /&gt;
			result_match = 'Keep'&lt;br /&gt;
			icon_filename = 'File:White check mark in dark green rounded square.svg'&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find('delete')) then&lt;br /&gt;
			result_match = 'Delete'&lt;br /&gt;
			icon_filename = 'File:White x in red rounded square.svg'&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find('retarget') or parameter_lower:find('soft redirect'))then&lt;br /&gt;
			result_match = 'Retarget'&lt;br /&gt;
			icon_filename = 'File:Right-pointing white arrow in blue rounded square.svg'&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find('disambig') or parameter_lower:find('dab') or parameter_lower:find('sia') or parameter_lower:find('set index')) then&lt;br /&gt;
			result_match = 'Disambiguate'&lt;br /&gt;
			icon_filename = 'File:Three disambiguation arrows icon in rounded blue square.svg'&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find('no consensus') and find_count == 0) then&lt;br /&gt;
			--This catches instances of &amp;quot;no consensus&amp;quot; that isn't qualified by &amp;quot;default to [keep/delete]&amp;quot;&lt;br /&gt;
			result_match = 'No consensus'&lt;br /&gt;
			icon_filename = 'File:White equals sign on grey rounded square.svg'&lt;br /&gt;
			find_count = 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if find_count &amp;gt;= 2 or (argIsSet('result') and find_count == 0) then&lt;br /&gt;
			result_match = 'Split or bespoke decisions'&lt;br /&gt;
			icon_filename = 'File:White i in purple rounded square.svg'&lt;br /&gt;
		elseif find_count &amp;lt;= 0 then&lt;br /&gt;
			result_match = 'No decision'&lt;br /&gt;
			icon_filename = 'File:50% grey rounded square.svg'&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		return result_match, icon_filename&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--Detect result first, default to &amp;quot;no decision&amp;quot; if arg not set&lt;br /&gt;
	local result_match = 'No decision'&lt;br /&gt;
	local icon_filename = 'File:50% grey rounded square.svg'&lt;br /&gt;
	local result_string = ''&lt;br /&gt;
	if (argIsSet('result')) then&lt;br /&gt;
		result_string = ' Result was: '&lt;br /&gt;
		result_match, icon_filename = match_result(args['result'])&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--Build wikitext for result icon&lt;br /&gt;
	local message_string1 = '&amp;lt;includeonly&amp;gt;' --includeonly tag&lt;br /&gt;
	--then dump the icon&lt;br /&gt;
	.. '[[' .. icon_filename&lt;br /&gt;
	.. '|16px|link=|alt=' .. result_match .. &amp;quot;]] '''Closed discussion''', see [[&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	--Build wikilink to full discussion.&lt;br /&gt;
	--mw.title.getCurrentTitle() will resolve correctly if substed&lt;br /&gt;
	local timestamp_string = os.time()&lt;br /&gt;
	local link_string = tostring(mw.title.getCurrentTitle()) ..  '#' .. timestamp_string&lt;br /&gt;
	local message_string2 = '|full discussion]].'&lt;br /&gt;
	&lt;br /&gt;
	--Complete the includeonly result message and build the anchor on daily log page&lt;br /&gt;
	local end_string = '&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&amp;lt;span id=&amp;quot;' .. timestamp_string .. '&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;'&lt;br /&gt;
&lt;br /&gt;
	--Put it all together and return from Lua&lt;br /&gt;
	return message_string1 .. link_string .. message_string2 .. result_string .. end_string&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rfd.rfdt_show_result(frame)&lt;br /&gt;
	return '&amp;lt;/noinclude&amp;gt;' .. frame.args['result'] .. '&amp;lt;includeonly&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rfd.rfdb_noinclude(frame)&lt;br /&gt;
	return '&amp;lt;/noinclude&amp;gt;'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return rfd&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>