Content deleted Content added
No edit summary |
No edit summary |
||
Line 2:
function p.review(frame)
page = frame.args['page'] or frame.args[1]
article = mw.title.new(page,'')
content = article:getContent()
Line 15:
return result
else
end
if result == '' then
result = 'The article is perfect!'
else
result = 'The article has some problems:\n'..result
end
return result
Line 24 ⟶ 29:
function critique(content)
issues = {}
--infobox
if not string.match(content, '{{Infobox') then
issues['infobox'] = 'false'
end
--categories
if not string.match(content, '%[%[Category:') then
issues['category'] = 'none'
end
return issues
Line 29 ⟶ 44:
function text(issue, details)
if issue == 'infobox' then
return '* There is no infobox.\n'
end
if issue == 'category' and details == 'none' then
return '* There are no categories.\n'
end
return 'Error: issue not found! Issue: '..issue..' = '..details
end
|