<?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%3AXfD_old%2FAfD_and_MfD</id>
	<title>Module:XfD old/AfD and MfD - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AXfD_old%2FAfD_and_MfD"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:XfD_old/AfD_and_MfD&amp;action=history"/>
	<updated>2026-06-14T08:23:07Z</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:XfD_old/AfD_and_MfD&amp;diff=480092&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:XfD_old/AfD_and_MfD&amp;diff=480092&amp;oldid=prev"/>
		<updated>2021-07-16T08:01:32Z</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;-- Various hacky solutions to allow AfD and MfD to show up on [[Template:XFD Backlog]]&lt;br /&gt;
-- AfD is easy, as [[User:Mathbot]] already summarizes the total on each day&lt;br /&gt;
local p = {}&lt;br /&gt;
local lang = mw.getContentLanguage()&lt;br /&gt;
function p.afd(frame) &lt;br /&gt;
	local month = frame.args.month&lt;br /&gt;
	local pat&lt;br /&gt;
	if month == &amp;quot;total&amp;quot; then&lt;br /&gt;
		pat = &amp;quot;%(([0-9]+) open&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		month = lang:formatDate(&amp;quot;Y F&amp;quot;, month)&lt;br /&gt;
		pat = &amp;quot;%[%[Wikipedia:Articles for deletion/Log/&amp;quot; .. month .. &amp;quot;[^%]]*%]%] %(([0-9]+) open /&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local content = mw.title.new(&amp;quot;Wikipedia:Articles for deletion/Old&amp;quot;):getContent()&lt;br /&gt;
	local count = 0&lt;br /&gt;
	for daycount in content:gmatch(pat) do&lt;br /&gt;
		count = count + daycount&lt;br /&gt;
	end&lt;br /&gt;
	return count&lt;br /&gt;
end&lt;br /&gt;
-- MfD is much harder, because the only list of all active MfDs is the main&lt;br /&gt;
-- [[Wikipedia:Miscellany for deletion]] page itself&lt;br /&gt;
function p.mfd(frame)&lt;br /&gt;
	local month = frame.args.month&lt;br /&gt;
	local content = mw.title.new(&amp;quot;Wikipedia:Miscellany for deletion&amp;quot;):getContent()&lt;br /&gt;
	local rightmonth = true&lt;br /&gt;
	local pat;&lt;br /&gt;
	if month ~= &amp;quot;total&amp;quot; then&lt;br /&gt;
		pat = lang:formatDate(&amp;quot;^=== ?F [0-9]*, Y ?===$&amp;quot;, month)&lt;br /&gt;
		rightmonth = false&lt;br /&gt;
	end&lt;br /&gt;
	local _, endindex = content:find(&amp;quot;==Old business==&amp;quot;)&lt;br /&gt;
	local count = 0&lt;br /&gt;
	for line in mw.text.gsplit(content:sub(endindex,#content), &amp;quot;\n&amp;quot;) do&lt;br /&gt;
		if line:find(&amp;quot;{{Wikipedia:Miscellany for deletion/&amp;quot;) and rightmonth then&lt;br /&gt;
			count = count + 1&lt;br /&gt;
		elseif month == &amp;quot;total&amp;quot; then&lt;br /&gt;
			-- don't worry about month section headers&lt;br /&gt;
		elseif line:find(pat) then&lt;br /&gt;
			rightmonth = true&lt;br /&gt;
		elseif line:find(&amp;quot;=== ?.* ?===&amp;quot;) then&lt;br /&gt;
			-- A section header for the wrong month&lt;br /&gt;
			if rightmonth then&lt;br /&gt;
				-- We're now looking at MfDs before the month in question&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
			-- We still haven't reached the month in question yet&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return count&lt;br /&gt;
end&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>