941
次編輯
Economy666(留言 | 貢獻) 小無編輯摘要 |
Economy666(留言 | 貢獻) (getOrder()) |
||
行 240: | 行 240: | ||
local parentArgs = frame:getParent().args | local parentArgs = frame:getParent().args | ||
local Args = frame.args | local Args = frame.args | ||
local function getOrder(name) | |||
local orderArg = parentArgs[name] | |||
if orderArg then return mw.text.split(orderArg,'\n') end | |||
end | |||
local function getDescription(title) | local function getDescription(title) | ||
return parentArgs[title .. '.description'] or '' | return parentArgs[title .. '.description'] or '' | ||
行 362: | 行 368: | ||
for designer,songs in pairs(singleList) do | for designer,songs in pairs(singleList) do | ||
writeText(designer, songs) | writeText(designer, songs) | ||
singleList[designer]=nil | |||
end | end | ||
end | end | ||
return theText | return theText | ||
end | end | ||
local commonText = cateText( | local common = getOrder("common") | ||
local commonText = cateText(common, '==') | |||
local rare = getOrder("rare") | |||
local rareTitle = '已确认的其他谱师名义及相关曲目名单' | local rareTitle = '已确认的其他谱师名义及相关曲目名单' | ||
local rareText = '\n=='.. rareTitle .. '==\n' .. getDescription(rareTitle) | local rareText = '\n=='.. rareTitle .. '==\n' .. getDescription(rareTitle) | ||
rareText = rareText .. cateText(rare, '===') | rareText = rareText .. cateText(rare, '===') | ||
local uncommonTitle = '未采用常驻谱师名义的曲目名单及所用名义' | local uncommonTitle = '未采用常驻谱师名义的曲目名单及所用名义' | ||
local uncommonText = '\n=='.. uncommonTitle .. '==\n' .. getDescription(uncommonTitle) | local uncommonText = '\n=='.. uncommonTitle .. '==\n' .. getDescription(uncommonTitle) | ||
local headText = cateText(uncommon_head, '===') | local headText = cateText(getOrder("uncommon_head"), '===') | ||
local endText = cateText(uncommon_end, '===') | local endText = cateText(getOrder("uncommon_end"), '===') | ||
uncommonText = uncommonText..headText..cateText(nil, '===')..endText | uncommonText = uncommonText..headText..cateText(nil, '===')..endText | ||
次編輯