Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Number of works: Difference between revisions

From ProleWiki, the proletarian encyclopedia
No edit summary
Tag: Manual revert
No edit summary
Line 4: Line 4:
     local category = frame.args.category or ''
     local category = frame.args.category or ''
     local pages = mw.site.stats.pagesInCategory(category)
     local pages = mw.site.stats.pagesInCategory(category)
     return tostring(pages - 1)
     return tostring(pages)
end
end



Revision as of 23:05, 4 July 2023

local p = {}

function p.getWorkCount(frame)
    local category = frame.args.category or ''
    local pages = mw.site.stats.pagesInCategory(category)
    return tostring(pages)
end

function p.main(frame)
    return p.getWorkCount(frame)
end

return p