Documentation for this module may be created at Module:Sandbox/SD0001/BAMSection/doc
local getArgs = require('Module:Arguments').getArgs
local p = {}
function p.main(frame)
local args = getArgs(frame)
local report = mw.title.new('Wikipedia:Bot activity monitor/Report'):getContent()
local bot = args[1]
-- table start
local section = report:match('{|.-!.-|%-\n')
-- entries
for entry in report:gmatch('| %[%[User:' .. bot .. '|' .. bot .. '%]%].-|%-') do
section = section .. entry .. '\n'
end
-- end
section = section .. '|}'
section = frame:preprocess(section)
return section
end
return p