Module:Sandbox/ProcrastinatingReader: Difference between revisions

Content deleted Content added
data
No edit summary
 
(38 intermediate revisions by the same user not shown)
Line 1:
local p = {}
local getArgs = require('Module:Arguments').getArgs
local tableTools = require('Module:TableTools')
local data = mw.loadData('Module:Sandbox/ProcrastinatingReader/data')
 
function p.main(frame)
local argspage = getArgsmw.title.new(frame, {.args[1])
local content = page:getContent()
wrappers = {
content = mw.ustring.find(content, '{{ArbCom Arab-Israeli enforcement', 1, true) or mw.ustring.find(content, '{{Arab-Israeli Arbitration Enforcement', 1, true)
--'Template:Sandbox/ProcrastinatingReader'
}
})
return p.build(frame, args)
end
 
function p.build(frame, args)
local criterion = args['criterion']
 
return frame:expandTemplate{ title = 'db-meta', args = {
-- Required
data[criterion]['noticedesc'], -- Main text, in bold
data[criterion]['noticedesc_extra'], -- Main text, in italics
criterion = criterion, -- Criteron
 
-- Additional data
notes = '',
anotes = '',
summary = data[criterion]['description'],
 
-- Pass generic params onto db-meta
bot = args['bot'] or '',
raw = args['raw'] or '',
--self = args['self'] or '',
image = args['image'] or '',
wiki = args['wiki'] or '',
blanked = args['blanked'] or '',
blankedtext = args['blanked-text'] or '',
pleaseblank = args['pleaseblank'] or '',
divblank = args['divblank'] or '',
help = args['help'] or ''
}}
end
 
function p._build(args)
if content then
return "1"
else
return "0"
end
end