<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://ethans-workspace.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ATaxonbar%2Fcandidate</id>
	<title>Module:Taxonbar/candidate - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://ethans-workspace.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ATaxonbar%2Fcandidate"/>
	<link rel="alternate" type="text/html" href="http://ethans-workspace.com/w/index.php?title=Module:Taxonbar/candidate&amp;action=history"/>
	<updated>2026-05-25T05:23:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://ethans-workspace.com/w/index.php?title=Module:Taxonbar/candidate&amp;diff=4596&amp;oldid=prev</id>
		<title>Ethan: Created page with &quot;local p = {}  function p.check(frame) 	local taxonbarExists = require(&#039;Module:Taxonbar/exists&#039;).check 	if taxonbarExists(frame) == true then 		return &#039;&#039; 	else 		local resolveEntity = require( &#039;Module:ResolveEntityId&#039; ) 		local currentTitle = mw.title.getCurrentTitle() 		local currentItem = nil 		local categories = { 			&#039;Category:Taxobox articles possibly missing a taxonbar&#039; --unset if acceptable or unacceptable found 		} 		 		--preliminary exclusion criteria 		if str...&quot;</title>
		<link rel="alternate" type="text/html" href="http://ethans-workspace.com/w/index.php?title=Module:Taxonbar/candidate&amp;diff=4596&amp;oldid=prev"/>
		<updated>2026-01-01T23:15:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  function p.check(frame) 	local taxonbarExists = require(&amp;#039;Module:Taxonbar/exists&amp;#039;).check 	if taxonbarExists(frame) == true then 		return &amp;#039;&amp;#039; 	else 		local resolveEntity = require( &amp;#039;Module:ResolveEntityId&amp;#039; ) 		local currentTitle = mw.title.getCurrentTitle() 		local currentItem = nil 		local categories = { 			&amp;#039;&lt;a href=&quot;/w/index.php?title=Category:Taxobox_articles_possibly_missing_a_taxonbar&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:Taxobox articles possibly missing a taxonbar (page does not exist)&quot;&gt;Category:Taxobox articles possibly missing a taxonbar&lt;/a&gt;&amp;#039; --unset if acceptable or unacceptable found 		} 		 		--preliminary exclusion criteria 		if str...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.check(frame)&lt;br /&gt;
	local taxonbarExists = require(&amp;#039;Module:Taxonbar/exists&amp;#039;).check&lt;br /&gt;
	if taxonbarExists(frame) == true then&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		local resolveEntity = require( &amp;#039;Module:ResolveEntityId&amp;#039; )&lt;br /&gt;
		local currentTitle = mw.title.getCurrentTitle()&lt;br /&gt;
		local currentItem = nil&lt;br /&gt;
		local categories = {&lt;br /&gt;
			&amp;#039;[[Category:Taxobox articles possibly missing a taxonbar]]&amp;#039; --unset if acceptable or unacceptable found&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		--preliminary exclusion criteria&lt;br /&gt;
		if string.match( currentTitle.text, &amp;#039;^List of &amp;#039;) then&lt;br /&gt;
			return &amp;#039;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		--find Wikidata item&lt;br /&gt;
		if currentTitle.namespace == 0 then --mainspace&lt;br /&gt;
			local currentEntityId = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
			if resolveEntity._id(currentEntityId) then&lt;br /&gt;
				currentItem = mw.wikibase.getEntity(currentEntityId)&lt;br /&gt;
			else --currentEntityId == nil/unresolvable&lt;br /&gt;
				return categories[1]&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			return &amp;#039;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if currentItem then --currentItem should not be nil here, but check just in case&lt;br /&gt;
			--determine if {{Taxonbar}} is *definitely* missing, *possibly* missing, or not missing at all&lt;br /&gt;
			local whitelist = require( &amp;#039;Module:Taxonbar/whitelist&amp;#039; ).whitelist&lt;br /&gt;
			local blacklist = require( &amp;#039;Module:Taxonbar/blacklist&amp;#039; ).blacklist&lt;br /&gt;
			local acceptableInstanceOf_All = whitelist{ args = { &amp;#039;all&amp;#039; } }&lt;br /&gt;
			local unacceptableInstanceOf = blacklist{ args = {} }&lt;br /&gt;
			&lt;br /&gt;
			local acceptableCount = 0&lt;br /&gt;
			local unacceptableCount = 0&lt;br /&gt;
			for _, instanceOfState in pairs ( currentItem:getBestStatements(&amp;#039;P31&amp;#039;) ) do --instance of&lt;br /&gt;
				local instanceOf = instanceOfState.mainsnak.datavalue.value.id&lt;br /&gt;
				if acceptableInstanceOf_All[instanceOf] then&lt;br /&gt;
					acceptableCount = acceptableCount + 1&lt;br /&gt;
				elseif unacceptableInstanceOf[instanceOf] then&lt;br /&gt;
					unacceptableCount = unacceptableCount + 1&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			for _, subclassOfState in pairs ( currentItem:getBestStatements(&amp;#039;P279&amp;#039;) ) do --subclass of&lt;br /&gt;
				local subclassOf = subclassOfState.mainsnak.datavalue.value.id&lt;br /&gt;
				if acceptableInstanceOf_All[subclassOf] then&lt;br /&gt;
					acceptableCount = acceptableCount + 1&lt;br /&gt;
				elseif unacceptableInstanceOf[subclassOf] then&lt;br /&gt;
					unacceptableCount = unacceptableCount + 1&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			if acceptableCount &amp;gt; 0 then&lt;br /&gt;
				categories[1] = &amp;#039;&amp;#039;&lt;br /&gt;
				categories[2] = &amp;#039;[[Category:Taxobox articles missing a taxonbar]]&amp;#039;&lt;br /&gt;
			elseif unacceptableCount &amp;gt; 0 then&lt;br /&gt;
				categories[1] = &amp;#039;&amp;#039;&lt;br /&gt;
				categories[2] = &amp;#039;&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			return table.concat(categories)&lt;br /&gt;
			&lt;br /&gt;
		else&lt;br /&gt;
			return &amp;#039;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Ethan</name></author>
	</entry>
</feed>