Difference between revisions of "Module:WCNA 2023 Session Categories"

From WikiConference North America
Jump to navigation Jump to search
(Starting session categories module for 2023)
 
m (Seeing if removing parentheses helps with categorizing WikiCred submissions)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
local p = {}
 
local p = {}
   
local categories_base = "[[Category:Submissions/2023/"
+
local category_base = "[[Category:Submissions/2023/"
  +
local categories = {
  +
"Recent Changes",
  +
"Community Initiatives",
  +
"Education",
  +
"Equity / Inclusion / Community Health",
  +
"GLAM / Heritage / Culture",
  +
"Governance",
  +
"Languages",
  +
"Legal / Advocacy / Risks",
  +
"Open Data",
  +
"Research / Science / Medicine",
  +
"Technology",
  +
"Wild Ideas",
  +
"Credibility / Mis and Disinformation"
  +
}
   
 
function p.main( frame )
 
function p.main( frame )
categories = ""
+
output = ""
  +
for index, value in ipairs(categories) do
if string.match(frame.args["1"], "Global") then
+
if string.match(frame.args["1"], value) then
categories = categories .. categories_base .. "Global & Local]]"
 
  +
output = output .. category_base .. string.gsub(value, " / ", ", ") .. "]]"
end
+
end
if string.match(frame.args["1"], "Relationship Building") then
 
 
end
categories = categories .. categories_base .. "Relationship Building & Support]]"
 
  +
end
 
 
return output
if string.match(frame.args["1"], "Inclusion") then
 
categories = categories .. categories_base .. "Inclusion & Diversity]]"
 
end
 
if string.match(frame.args["1"], "Depth") then
 
categories = categories .. categories_base .. "Depth & Breadth for Newer Editors]]"
 
end
 
if string.match(frame.args["1"], "Tech") then
 
categories = categories .. categories_base .. "Tech & Tools]]"
 
end
 
if string.match(frame.args["1"], "Harassment") then
 
categories = categories .. categories_base .. "Harassment, Civility, & Safety]]"
 
end
 
if string.match(frame.args["1"], "Other") then
 
categories = categories .. categories_base .. "Other]]"
 
end
 
return categories
 
 
end
 
end
   

Latest revision as of 01:51, 11 July 2023

Documentation for this module may be created at Module:WCNA 2023 Session Categories/doc

local p = {}

local category_base = "[[Category:Submissions/2023/"
local categories = {
	"Recent Changes",
	"Community Initiatives",
	"Education",
	"Equity / Inclusion / Community Health",
	"GLAM / Heritage / Culture",
	"Governance",
	"Languages",
	"Legal / Advocacy / Risks",
	"Open Data",
	"Research / Science / Medicine",
	"Technology",
	"Wild Ideas",
	"Credibility / Mis and Disinformation"
}

function p.main( frame )
    output = ""
    for index, value in ipairs(categories) do
		if string.match(frame.args["1"], value) then
			output = output .. category_base .. string.gsub(value, " / ", ", ") .. "]]"
		end
	end

    return output
end

return p