模块:自定义信息

来自东方活动维基

请参考模板:自定义信息/doc的帮助内容。


local customInfoGenerator = {}

function customInfoGenerator.get(frame)
	args, argsSize = frame:getParent().args, 0
	argsList = {}
	for k, _ in pairs(args) do
		if k ~= "cover" and k ~= "covertitle" and k ~= "titlename" then
			argsSize = argsSize + 1
			argsList[argsSize] = k
		end
	end
	table.sort(argsList)
	ret = ''
	for i = 1, argsSize do
		ret = ret .. '|-\n|<p><b>' .. argsList[i] .. '</b></p>\n|<p>' .. args[argsList[i]] .. '</p>\n'
	end
	return ret
end

return customInfoGenerator