<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AWikiProject_quality_summary</id>
	<title>Module:WikiProject quality summary - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AWikiProject_quality_summary"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:WikiProject_quality_summary&amp;action=history"/>
	<updated>2026-05-26T16:04:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:WikiProject_quality_summary&amp;diff=147682&amp;oldid=prev</id>
		<title>imported&gt;Andrybak: remove space – Undid revision 1001871741 by Cupper52 (talk)</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:WikiProject_quality_summary&amp;diff=147682&amp;oldid=prev"/>
		<updated>2021-01-23T09:32:52Z</updated>

		<summary type="html">&lt;p&gt;remove space – Undid revision 1001871741 by &lt;a href=&quot;/research/Special:Contributions/Cupper52&quot; title=&quot;Special:Contributions/Cupper52&quot;&gt;Cupper52&lt;/a&gt; (&lt;a href=&quot;/index.php?title=User_talk:Cupper52&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:Cupper52 (page does not exist)&quot;&gt;talk&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module&amp;#039;s function lookup table, used by the calling context&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Extract article counts from the WP 1.0 quality categories for a WikiProject&lt;br /&gt;
-- Returns a wikitext prose description of the numbers.&lt;br /&gt;
-- &lt;br /&gt;
-- TODO:&lt;br /&gt;
-- * The output is hardcoded, which is inflexible. Move out to calling template?&lt;br /&gt;
-- * Need to evaluate if all relevant QA Class categories are handled.&lt;br /&gt;
-- * Bad input leads to nonsensical output. Should default to reasonable nil values.&lt;br /&gt;
function p.qstats(frame)&lt;br /&gt;
&lt;br /&gt;
  -- Determine the WikiProject for which to grab stats.&lt;br /&gt;
  local topic&lt;br /&gt;
  if frame.args.topic then -- Use the argument provided.&lt;br /&gt;
    topic = frame.args.topic&lt;br /&gt;
  elseif frame.args[1] then -- Specialcase use the first (only) positional argument&lt;br /&gt;
    topic = frame.args[1]&lt;br /&gt;
  else -- By default grab the calling context&amp;#039;s title as the topic.&lt;br /&gt;
    -- Get the name of the calling page and extract everything after &amp;quot;WikiProject &amp;quot;.&lt;br /&gt;
    local title = mw.title.getCurrentTitle()&lt;br /&gt;
    topic = string.sub(title.rootText, 13, -1)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  -- WP 1.0 category names follow the pattern &amp;quot;&amp;lt;class&amp;gt;-Class &amp;lt;topic&amp;gt; articles&amp;quot;.&lt;br /&gt;
  local cSuffix = &amp;quot;-Class &amp;quot; .. topic .. &amp;quot; articles&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  -- Get the article counts for each handled class.&lt;br /&gt;
  local qFA    = mw.site.stats.pagesInCategory(&amp;quot;FA&amp;quot;    .. cSuffix, &amp;quot;pages&amp;quot;)&lt;br /&gt;
  local qGA    = mw.site.stats.pagesInCategory(&amp;quot;GA&amp;quot;    .. cSuffix, &amp;quot;pages&amp;quot;)&lt;br /&gt;
  local qA     = mw.site.stats.pagesInCategory(&amp;quot;A&amp;quot;     .. cSuffix, &amp;quot;pages&amp;quot;)&lt;br /&gt;
  local qB     = mw.site.stats.pagesInCategory(&amp;quot;B&amp;quot;     .. cSuffix, &amp;quot;pages&amp;quot;)&lt;br /&gt;
  local qC     = mw.site.stats.pagesInCategory(&amp;quot;C&amp;quot;     .. cSuffix, &amp;quot;pages&amp;quot;)&lt;br /&gt;
  local qStart = mw.site.stats.pagesInCategory(&amp;quot;Start&amp;quot; .. cSuffix, &amp;quot;pages&amp;quot;)&lt;br /&gt;
  local qStub  = mw.site.stats.pagesInCategory(&amp;quot;Stub&amp;quot;  .. cSuffix, &amp;quot;pages&amp;quot;)&lt;br /&gt;
  local qList  = mw.site.stats.pagesInCategory(&amp;quot;List&amp;quot;  .. cSuffix, &amp;quot;pages&amp;quot;)&lt;br /&gt;
  local qFL    = mw.site.stats.pagesInCategory(&amp;quot;FL&amp;quot;    .. cSuffix, &amp;quot;pages&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  -- Sum of all class article counts; i.e. all articles in scope of the WikiProject.&lt;br /&gt;
  local total = qFA + qGA + qA + qB + qC + qStart + qStub + qList + qFL&lt;br /&gt;
&lt;br /&gt;
  -- Sum of featured content (FA + FL).&lt;br /&gt;
  local qFeatured = qFA + qFL&lt;br /&gt;
&lt;br /&gt;
  -- Calculate numerical and percentage proportion of articles at FA or FL level.&lt;br /&gt;
  local pnFeatured = total / (qFA + qFL)&lt;br /&gt;
  local ppFeatured = (100 / total) * (qFA + qFL)&lt;br /&gt;
&lt;br /&gt;
  -- Calculate numerical and percentage proportion of articles at GA level.&lt;br /&gt;
  local pnGood = total / qGA&lt;br /&gt;
  local ppGood = (100 / total) * qGA&lt;br /&gt;
&lt;br /&gt;
  -- Calculate numerical and percentage proportion of articles at FA, FL, and GA level.&lt;br /&gt;
  local pnForG = total / (qFA + qGA + qFL)&lt;br /&gt;
  local ppForG = (100 / total) * (qFA + qGA + qFL)&lt;br /&gt;
&lt;br /&gt;
  -- Create the wikitext output and return it to the calling template.&lt;br /&gt;
  local format = [=[There are &amp;#039;&amp;#039;&amp;#039;%d&amp;#039;&amp;#039;&amp;#039; articles within the scope of the %s project. Currently the project has &amp;#039;&amp;#039;&amp;#039;%d&amp;#039;&amp;#039;&amp;#039; [[WP:FA|Featured articles]] and [[WP:FL|lists]], or 1 out of every %d articles in the project (%.1f%%). It also has &amp;#039;&amp;#039;&amp;#039;%d&amp;#039;&amp;#039;&amp;#039; [[WP:GA|Good articles]]: 1 out of every %d articles (%.1f%%). Thus, one in &amp;#039;&amp;#039;&amp;#039;%d&amp;#039;&amp;#039;&amp;#039; articles in the project is rated GA or higher (%.1f%%).]=]&lt;br /&gt;
  return mw.ustring.format(format, total, topic, qFeatured, pnFeatured, ppFeatured, qGA, pnGood, ppGood, pnForG, ppForG)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Andrybak</name></author>
	</entry>
</feed>