Module:Backlog table

--[=[ Implements Template:Backlog table ]=] require('strict')

local p = {} --p stands for package

local getArgs = require('Module:Arguments').getArgs

local function backlog_status(cat) if not cat then return nil end local count = mw.site.stats.pagesInCategory(cat, 'all') local frame = mw.getCurrentFrame if count < 20 then return frame:expandTemplate { ['title'] = 'done', ['args'] = {} }	elseif count < 50 then return frame:expandTemplate { ['title'] = 'doing', ['args'] = {'No backlog'} }	else return frame:expandTemplate { ['title'] = 'not done' }	end end

local function backlog_button(cat) return ' ' .. cat .. ' ' end

local function backlog_tr(cat) if not cat then return nil end local link = backlog_button(cat) local status = backlog_status(cat) return ' ' .. link .. ' ' .. status .. ' ' end

function p._backlog_table(args) local table_open = ' ' end

function p.backlog_table(frame) return p._backlog_table(getArgs(frame)) end

return p