<?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%3ASports_results%2Fblank</id>
	<title>Module:Sports results/blank - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ASports_results%2Fblank"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Sports_results/blank&amp;action=history"/>
	<updated>2026-06-15T22:21:48Z</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:Sports_results/blank&amp;diff=479562&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:Sports_results/blank&amp;diff=479562&amp;oldid=prev"/>
		<updated>2021-07-16T06:41:17Z</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;-- This module generates a blank invocation of the sports results module&lt;br /&gt;
-- using the values of team1, team2, ...&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function isnotempty(s)&lt;br /&gt;
	return s and s:match( '^%s*(.-)%s*$' ) ~= ''&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = (frame.args['team1'] ~= nil) and frame.args or frame:getParent().args&lt;br /&gt;
	&lt;br /&gt;
	local processed = {}&lt;br /&gt;
	-- Count the number of teams&lt;br /&gt;
	local numteams = 0&lt;br /&gt;
	while isnotempty(args['team' .. (numteams + 1)]) do &lt;br /&gt;
		numteams = numteams + 1&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local res = '{{#invoke:sports results|main\n'&lt;br /&gt;
	if args['template_name'] then&lt;br /&gt;
		res = res .. '| template_name =  ' &lt;br /&gt;
			.. (args['template_name'] or '&amp;lt;!-- to add v-t-e links --&amp;gt;') .. '\n'&lt;br /&gt;
		processed['template_name'] = 1&lt;br /&gt;
	end&lt;br /&gt;
	res = res .. '| source = ' &lt;br /&gt;
		.. (args['source'] or '&amp;lt;!-- source --&amp;gt;') .. '\n'&lt;br /&gt;
	processed['source'] = 1&lt;br /&gt;
	&lt;br /&gt;
	res = res .. '| update = ' &lt;br /&gt;
		.. (args['update'] or '&amp;lt;!-- last updated --&amp;gt;') .. '\n'&lt;br /&gt;
	processed['update'] = 1&lt;br /&gt;
	&lt;br /&gt;
	if args['start_date']  then&lt;br /&gt;
		res = res .. '| start_date = ' .. args['start_date'] .. '\n'&lt;br /&gt;
		processed['start_date'] = 1&lt;br /&gt;
	end&lt;br /&gt;
	if args['match_col_width'] then&lt;br /&gt;
		res = res .. '| match_col_width = ' .. args['match_col_width'] .. '\n'&lt;br /&gt;
		processed['match_col_width'] = 1&lt;br /&gt;
	end&lt;br /&gt;
	if args['matches_style'] then&lt;br /&gt;
		res = res .. '| matches_style = ' .. args['matches_style'] .. '\n'&lt;br /&gt;
		processed['matches_style'] = 1&lt;br /&gt;
	end&lt;br /&gt;
	if args['a_note'] then&lt;br /&gt;
		res = res .. '| a_note = ' .. args['a_note'] .. '\n'&lt;br /&gt;
		processed['a_note'] = 1&lt;br /&gt;
	end&lt;br /&gt;
	if args['showteam'] then&lt;br /&gt;
		res = res .. '| showteam = ' ..&lt;br /&gt;
			(args['showteam'] or '&amp;lt;!-- for bolding one team results --&amp;gt;') .. '\n'&lt;br /&gt;
		processed['showteam'] = 1&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for i=1,numteams do&lt;br /&gt;
		local ab = args['team' .. i]&lt;br /&gt;
		processed['team' .. i] = 1&lt;br /&gt;
		res = res .. '| team' .. i .. '= ' .. ab .. ' '&lt;br /&gt;
	end&lt;br /&gt;
	res = res .. '\n\n'&lt;br /&gt;
	for i=1,numteams do&lt;br /&gt;
		local ab = args['team' .. i]&lt;br /&gt;
		res = res .. '| name_'..ab ..' = '.. (args['name_'..ab] or '') .. '\n'&lt;br /&gt;
		processed['name_'..ab] = 1&lt;br /&gt;
		if (args['short_'..ab]) then&lt;br /&gt;
			res = res .. '| short_'..ab ..' = '.. (args['short_'..ab] or '') .. '\n'&lt;br /&gt;
			processed['short_'..ab] = 1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	res = res .. '\n'&lt;br /&gt;
	for i=1,numteams do&lt;br /&gt;
		local abi = args['team' .. i]&lt;br /&gt;
		for j=1,numteams do&lt;br /&gt;
			local abj = args['team' .. j]&lt;br /&gt;
			if i ~= j then&lt;br /&gt;
				local mij = 'match_' .. abi .. '_' .. abj&lt;br /&gt;
				res = res .. '| ' .. mij .. ' = ' .. (args[mij] or '') .. '\n'&lt;br /&gt;
				processed[mij] = 1&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		res = res .. '\n'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local comment = '&amp;lt;!-- Other parameters --&amp;gt;\n'&lt;br /&gt;
	for k, v in pairs( args ) do&lt;br /&gt;
		if v ~=nil and processed[k] == nil then&lt;br /&gt;
			res = res .. comment .. '| ' .. k .. ' = ' .. v .. '\n'&lt;br /&gt;
			comment = ''&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	res = res .. '}}'&lt;br /&gt;
	&lt;br /&gt;
	return res&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>