Module:Category described in year: Difference between revisions

Content deleted Content added
m +Pseudo-log of cats using the Default tree
Let Spiders tree be handled by Default tree (yearmin is now largely unnecessary due to {{Navseasoncats}} use instead of {{Category in year}}; yearmin to be phased out towards end of category standardization, along with decade support)
Line 5:
--[[============================================================================
Any category group (e.g. BirdsBacteria/Plants/etc.) NOT explicitly outlined here in
in conf{} will follow the 'Default' tree for that group when the template is
used on that cateogry.
Line 20:
['tocmin'] = 401, --integer; minimum category size to add {{Category TOC}}
['Default'] = { --"group" (e.g. Amphibians/Birds/Crustaceans/Fish/Mammals/Molluscs/Reptiles/Spiders)
['yearmin'] = 1758, --integer; lowest possible year displayed in nav bars; 0/nil defaults to 1758 per ICZN Art. 5
['year'] = { --[[Category:Birds described in 1901]]
Line 44:
['parent1'] = 'formal', --[[Category:Animals by year of formal description]]
['parent2'] = 'Species', --[[Category:Species described in the 20th century]]
['description'] = '', --Century description tbd; container category, etc...
},
},
['Spiders'] = { --"group"
['yearmin'] = 1757, --integer; lowest possible year (and thus decade) displayed in nav bars; 0/nil defaults to 1758 per ICZN Art. 5
['year'] = { --[[Category:Spiders described in 1901]]
['parent1'] = 'century', --[[Category:Spiders described in the 20th century]]
['parent2'] = 'Animals', --[[Category:Animals described in 1901]]
['description'] = '', --Year description tbd; 'This category should only contain species articles', etc...
},
['century'] = { --[[Category:Spiders described in the 20th century]]
['parent1'] = 'formal', --[[Category:Spiders by year of formal description]]
['parent2'] = 'Animals', --[[Category:Animals described in the 20th century]]
['description'] = '', --Century description tbd; container category, etc...
},
Line 243 ⟶ 229:
--determine current/related/adjacent cats' properties/vars/etc.
local currGroup = mw.ustring.match(currCat, '^%w+') --PlantsBacteria/SpidersPlants/etc.
if conf[currGroup] == nil then conf[currGroup] = conf['Default'] end --default to Default
local currYDC = nil --possible future values: year/decade/century
Line 285 ⟶ 271:
if conf[currGroup] == nil then
bConfError = true
trackingCategories[2] = '[[Category:Described in year error|1]]' --group (PlantsBacteria/SpidersPlants/etc.) key missing from conf
elseif conf[currGroup][currYDC] == nil then
bConfError = true