<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://battleint.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AArticles_by_importance</id>
	<title>Module:Articles by importance - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://battleint.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AArticles_by_importance"/>
	<link rel="alternate" type="text/html" href="https://battleint.net/index.php?title=Module:Articles_by_importance&amp;action=history"/>
	<updated>2026-12-01T01:37:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://battleint.net/index.php?title=Module:Articles_by_importance&amp;diff=176488&amp;oldid=prev</id>
		<title>imported&gt;Deadfire: creation</title>
		<link rel="alternate" type="text/html" href="https://battleint.net/index.php?title=Module:Articles_by_importance&amp;diff=176488&amp;oldid=prev"/>
		<updated>2025-02-10T05:31:30Z</updated>

		<summary type="html">&lt;p&gt;creation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
local p = {}&lt;br /&gt;
local importances = {&amp;#039;Top&amp;#039;, &amp;#039;High&amp;#039;, &amp;#039;Mid&amp;#039;, &amp;#039;Low&amp;#039;, &amp;#039;Bottom&amp;#039;, &amp;#039;NA&amp;#039;, &amp;#039;Unknown&amp;#039;}&lt;br /&gt;
&lt;br /&gt;
p.main = function(frame)&lt;br /&gt;
	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame)&lt;br /&gt;
	local title = args.page and mw.title.new(page) or mw.title.getCurrentTitle()&lt;br /&gt;
	local imp, topic, typ = title.text:match(&amp;#039;^(%a+)-importance (.+) (%a+)$&amp;#039;)&lt;br /&gt;
	local out, exist, cats = &amp;#039;&amp;#039;, {}, {}&lt;br /&gt;
	local add_category = function(cat, sort)&lt;br /&gt;
		local link = &amp;#039;[[Category:&amp;#039; .. cat .. (sort and (&amp;#039;|&amp;#039; .. sort) or &amp;#039;&amp;#039;) .. &amp;#039;]]&amp;#039;&lt;br /&gt;
		table.insert(cats, link)&lt;br /&gt;
	end&lt;br /&gt;
	if args.importance and imp and args.topic and topic and (args.importance:lower()~=imp:lower() or args.topic~=topic) then&lt;br /&gt;
		add_category(&amp;#039;WikiProject assessment categories needing attention&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	topic = args.topic or topic or &amp;#039;&amp;#039;&lt;br /&gt;
	imp = args.imp or imp or &amp;#039;&amp;#039;&lt;br /&gt;
	typ = typ or &amp;#039;articles&amp;#039;&lt;br /&gt;
	if title.namespace==14 then&lt;br /&gt;
		out = frame:expandTemplate{title=&amp;#039;Possibly empty category&amp;#039;}&lt;br /&gt;
	end&lt;br /&gt;
	local cat_in_use = function(cat)&lt;br /&gt;
		local cat_title = mw.title.new(&amp;#039;Category:&amp;#039; .. cat)&lt;br /&gt;
		return cat_title and cat_title.exists or mw.site.stats.pagesInCategory(cat, &amp;#039;pages&amp;#039;)&amp;gt;0&lt;br /&gt;
	end&lt;br /&gt;
	for _, importance in ipairs(importances) do&lt;br /&gt;
		if cat_in_use(importance .. &amp;#039;-importance&amp;#039; .. &amp;#039; &amp;#039; .. topic .. &amp;#039; pages&amp;#039;) then&lt;br /&gt;
			exist[importance] = &amp;#039;pages&amp;#039;&lt;br /&gt;
		elseif cat_in_use(importance .. &amp;#039;-importance&amp;#039; .. &amp;#039; &amp;#039; .. topic .. &amp;#039; articles&amp;#039;) then&lt;br /&gt;
			exist[importance] = &amp;#039;articles&amp;#039;&lt;br /&gt;
		else&lt;br /&gt;
			exist[importance] = false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local imp_template = function(importance, page)&lt;br /&gt;
		return frame:expandTemplate{&lt;br /&gt;
			title = &amp;#039;importance&amp;#039;,&lt;br /&gt;
			args = {&lt;br /&gt;
				[1] = importance,&lt;br /&gt;
				topic = topic,&lt;br /&gt;
				category = topic .. &amp;#039; &amp;#039; .. page,&lt;br /&gt;
				bold = &amp;#039;no&amp;#039;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
	local header_row = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
	for _, importance in ipairs(importances) do&lt;br /&gt;
		if exist[importance] then&lt;br /&gt;
			header_row:node(imp_template(importance, exist[importance]))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if args.custom1 then&lt;br /&gt;
		header_row:node(imp_template(args.custom1, &amp;#039;articles&amp;#039;))&lt;br /&gt;
	end&lt;br /&gt;
	if args.custom2 then&lt;br /&gt;
		header_row:node(imp_template(args.custom2, &amp;#039;articles&amp;#039;))&lt;br /&gt;
	end&lt;br /&gt;
	local pages_in_cat = function(cat)&lt;br /&gt;
		local pages = mw.site.stats.pagesInCategory(cat, &amp;#039;pages&amp;#039;)&lt;br /&gt;
		local col = mw.html.create(&amp;#039;td&amp;#039;)&lt;br /&gt;
			:attr(&amp;#039;align&amp;#039;, &amp;#039;right&amp;#039;)&lt;br /&gt;
			:wikitext(mw.language.getContentLanguage():formatNum(pages))&lt;br /&gt;
		return col&lt;br /&gt;
	end&lt;br /&gt;
	local second_row = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
	for _, importance in ipairs(importances) do&lt;br /&gt;
		if exist[importance] then&lt;br /&gt;
			second_row:node(pages_in_cat(importance .. &amp;#039;-importance&amp;#039; .. &amp;#039; &amp;#039; .. topic .. &amp;#039; &amp;#039; .. exist[importance]))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if args.custom1 then&lt;br /&gt;
		second_row:node(pages_in_cat(args.custom1 .. &amp;#039;-importance&amp;#039; .. &amp;#039; &amp;#039; .. topic .. &amp;#039; articles&amp;#039;))&lt;br /&gt;
	end&lt;br /&gt;
	if args.custom2 then&lt;br /&gt;
		second_row:node(pages_in_cat(args.custom2 .. &amp;#039;-importance&amp;#039; .. &amp;#039; &amp;#039; .. topic .. &amp;#039; articles&amp;#039;))&lt;br /&gt;
	end&lt;br /&gt;
	local tab = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;toccolours&amp;#039;):addClass(&amp;#039;nomobile&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;table-layout&amp;#039;, &amp;#039;fixed&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;margin&amp;#039;, &amp;#039;1em auto&amp;#039;)&lt;br /&gt;
		:node(header_row)&lt;br /&gt;
		:node(second_row)&lt;br /&gt;
	if imp and imp~=&amp;#039;&amp;#039; and imp~=&amp;#039;nocat&amp;#039; then&lt;br /&gt;
		add_category(args.parent or (topic .. &amp;#039; articles by importance&amp;#039;), imp)&lt;br /&gt;
		add_category(imp .. &amp;#039;-importance &amp;#039; .. typ, args.sort or topic)&lt;br /&gt;
	end&lt;br /&gt;
	return out .. tostring(tab) .. table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Deadfire</name></author>
	</entry>
</feed>