--implement some tasks in local p = local getArgs = require('Module:Arguments').getArgslocal displayError = require('Module:Error').error
function p.main(frame) local args = getArgs(frame) local title = args[1] local page = mw.title.new(title, 0) if (not page) or page.namespace ~= 0 or page.isExternal then return displayError elseif not page.exists then--expensive return displayError elseif page.isRedirect then return displayError end local content = page:getContent --remove unwanted content --content = string.gsub(content, "\n%s%[%[File:..-%]%]\n", "\n")--files --content = string.gsub(content, "%s*\n%s*([^|%s])", "%1")--infoboxes content = string.gsub(content, "%b[]", function (match) if string.find(match, "