local p =
local format = string.formatlocal insert = table.insert
local function classWithName(class, name) return format(" %s", class, name)end
function p._ftbox(args) local featuredCount = 0 local goodCount = 0 local topicName = args.title local topicImage = args.image local topicImageSize = args.imagesize local topicLeadClass = args.leadClass if topicLeadClass
'FL' then featuredCount = featuredCount + 1 goodCount = goodCount + 1 elseif topicLeadClass
'GA' then goodCount = goodCount + 1 end local topicLeadName = args.leadName local articleArgs = local articleCount = 1 while true do local articleClass = args[articleCount * 2 - 1] if not articleClass then break end if articleClass
'FL' then featuredCount = featuredCount + 1 goodCount = goodCount + 1 elseif articleClass
'GA' then goodCount = goodCount + 1 end local article = insert(articleArgs, article) articleCount = articleCount + 1 end local column2Start = args.column2start local column3Start = args.column3start
-- Start generating output -- Topic box local lines = insert(lines, format("")
-- Progress bars insert(lines, format("", featuredCount, articleCount)) insert(lines, format("", goodCount, articleCount))
local wikitext = table.concat(lines, '\n') return wikitextend
function p.ftbox(frame) local argModule = require('Module:Arguments') local args = argModule.getArgs(frame) return frame:preprocess(p._ftbox(args))end
return p