<?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%3AEditing_advice</id>
	<title>Module:Editing advice - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AEditing_advice"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Editing_advice&amp;action=history"/>
	<updated>2026-06-17T12:33:49Z</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:Editing_advice&amp;diff=471552&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:Editing_advice&amp;diff=471552&amp;oldid=prev"/>
		<updated>2021-07-15T21:24:07Z</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 getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Fetch expansions of Editing advice meta templates&lt;br /&gt;
local function getRequestedAdvice(haystack, needle, pages)&lt;br /&gt;
	-- if a request is made for that advice&lt;br /&gt;
	if string.match(haystack, needle) then&lt;br /&gt;
		return mw.getCurrentFrame():expandTemplate{&lt;br /&gt;
					title = 'Editing advice/meta/' .. needle,&lt;br /&gt;
					args = pages or {}&lt;br /&gt;
			   }&lt;br /&gt;
	end&lt;br /&gt;
	return ''&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Return concatenation of fetched template expansions&lt;br /&gt;
local function compileRequestedAdvice(about, pages)&lt;br /&gt;
	return getRequestedAdvice(about, 'preview', pages) ..&lt;br /&gt;
		   getRequestedAdvice(about, 'summary') ..&lt;br /&gt;
		   getRequestedAdvice(about, 'sandbox')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[ Main function: iterates through provided params and uses&lt;br /&gt;
		what is discovered to call for and organise the requested output ]]&lt;br /&gt;
function p._getAdvice(cleanargs)&lt;br /&gt;
	-- Create capturing vars for data&lt;br /&gt;
	local about = ''&lt;br /&gt;
	local pages = {}&lt;br /&gt;
	local section = {}&lt;br /&gt;
	local f = mw.getCurrentFrame()&lt;br /&gt;
	-- Iterate through provided params&lt;br /&gt;
	for key, value in pairs(cleanargs) do&lt;br /&gt;
		-- If the param specifies the advice requested&lt;br /&gt;
		if key == 'about' then&lt;br /&gt;
			-- store the value&lt;br /&gt;
			about = value&lt;br /&gt;
		-- If the param specifies the section heading option&lt;br /&gt;
		elseif key == 'section' then&lt;br /&gt;
			-- store the value&lt;br /&gt;
			section[1] = value&lt;br /&gt;
		else&lt;br /&gt;
		--[[ If neither of the above, these params must be pages&lt;br /&gt;
				 so store the values as they are processed ]]&lt;br /&gt;
			pages[#pages + 1] = value&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- Output concatenation of fetched strings&lt;br /&gt;
	return f:expandTemplate{&lt;br /&gt;
				title = 'Editing advice/meta/start',&lt;br /&gt;
				args = section&lt;br /&gt;
		   } ..&lt;br /&gt;
		   compileRequestedAdvice(about, pages) ..&lt;br /&gt;
		   f:expandTemplate{&lt;br /&gt;
				title = 'Editing advice/meta/end'&lt;br /&gt;
		   }&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Get and cleanup frame args and pass them to _getAdvice&lt;br /&gt;
function p.getAdvice(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	return p._getAdvice(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>