Module:Draft topics
Appearance
local getArgs = require('Module:Arguments').getArgs
local p = {}
local categories = {}
categories["biography"] = "biographies"
categories["women"] = "women"
categories["food-and-drink"] = "food and drink"
categories["internet-culture"] = "internet culture"
categories["linguistics"] = "linguistics"
categories["literature"] = "literature"
categories["books"] = "books"
categories["entertainment"] = "entertainment"
categories["films"] = "films"
categories["media"] = "media"
categories["music"] = "music"
categories["radio"] = "radio"
categories["software"] = "software"
categories["television"] = "television"
categories["video-games"] = "video games"
categories["performing-arts"] = "performing arts"
categories["philosophy-and-religion"] = "philosophy and religion"
categories["sports"] = "sports"
categories["architecture"] = "architecture"
categories["comics-and-anime"] = "comics and anime"
categories["fashion"] = "fashion"
categories["visual-arts"] = "visual arts"
categories["geographical"] = "geographical topics"
categories["africa"] = "Africa"
categories["central-africa"] = "Central Africa"
categories["eastern-africa"] = "Eastern Africa"
categories["northern-africa"] = "Northern Africa"
categories["southern-africa"] = "Southern Africa"
categories["western-africa"] = "Western Africa"
categories["central-america"] = "Central America"
categories["north-america"] = "North America"
categories["south-america"] = "South America"
categories["asia"] = "Asia"
categories["central-asia"] = "Central Asia"
categories["east-asia"] = "East Asia"
categories["north-asia"] = "North Asia"
categories["south-asia"] = "South Asia"
categories["southeast-asia"] = "Southeast Asia"
categories["west-asia"] = "West Asia"
categories["eastern-europe"] = "Eastern Europe"
categories["europe"] = "Europe"
categories["northern-europe"] = "Northern Europe"
categories["southern-europe"] = "Southern Europe"
categories["western-europe"] = "Western Europe"
categories["oceania"] = "Oceania"
categories["business-and-economics"] = "business and economics"
categories["education"] = "education"
categories["history"] = "history"
categories["military-and-warfare"] = "military and warfare"
categories["politics-and-government"] = "politics and government"
categories["society"] = "society"
categories["transportation"] = "transportation"
categories["biology"] = "biology"
categories["chemistry"] = "chemistry"
categories["computing"] = "computing"
categories["earth-and-environment"] = "earth and environment"
categories["engineering"] = "engineering"
categories["libraries-and-information"] = "libraries and information"
categories["mathematics"] = "mathematics"
categories["medicine-and-health"] = "medicine and health"
categories["physics"] = "physics"
categories["stem"] = "STEM"
categories["space"] = "space"
categories["technology"] = "technology"
function p.main(frame)
local args = getArgs(frame)
return p._main(args)
end
function p._main(args)
local str = ''
for _, topic in ipairs(args) do
local cat = categories[topic]
if cat ~= nil then
str = str .. '[[Category:Draft articles on ' .. categories[topic] .. ']]'
end
end
return str
end
return p