Module:Cite news

From Sekaipedia

Documentation for this module may be created at Module:Cite news/doc

--------------------------
-- Module for [[Template:Cite news]]
------------------------
local getArgs   = require('Module:Arguments').getArgs

local p = {}

function p.main(frame)
	local args = getArgs(frame, { wrappers = 'Template:Cite news' })
	
	return p._main(args)
end

function p._main(args)
	local content = '[%s %s] [%s] (in Japanese). %s. Retreived %s.'
	
	content = string.format(
		content,
		args['link'] or '',
		args['title'] or '',
		args['tl title'] or '?',
		args['date'] or '?',
		args['access-date'] or '?'
	)
	
	local ref = mw.getCurrentFrame():extensionTag{
		name = 'ref',
		content = content,
		args = {
			name = args['ref name'],
			group = args['ref group']
		}
	}
	
	return ref
end

return p
Cookies help us deliver our services. By using our services, you agree to our use of cookies.