小 (typo) |
小 (fix) |
||
第17行: | 第17行: | ||
wikitext = '' |
wikitext = '' |
||
for voice_drama in series do |
for _, voice_drama in pairs(series) do |
||
if type(voice_drama) == 'table' then |
if type(voice_drama) == 'table' then |
||
wikitext = wikitext + '* [[' + voice_drama['name'] + ']] ー ' + voice_drama['note'] + '\n' |
wikitext = wikitext + '* [[' + voice_drama['name'] + ']] ー ' + voice_drama['note'] + '\n' |
2019年3月17日 (日) 16:31的版本
可在模块:系列/doc创建此模块的帮助文档
local p = {}
local series_table = mw.loadData('Module:系列/data')
--! 生成声剧系列的列表
--! @param 1 系列名
function p.generate_list()
local frame = mw.getCurrentFrame()
local series_name = frame.args[1]
if series_name == nil then
return ''
end
series = series_table[series_name]
if series == nil then
return ''
end
wikitext = ''
for _, voice_drama in pairs(series) do
if type(voice_drama) == 'table' then
wikitext = wikitext + '* [[' + voice_drama['name'] + ']] ー ' + voice_drama['note'] + '\n'
else
wikitext = wikitext + '* [[' + voice_drama + ']]\n'
end
end
return wikitext
end
return p