Module:Songtable:修订间差异

来自Arcaea中文维基
无编辑摘要
无编辑摘要
第5行: 第5行:


function timeCov(t)
function timeCov(t)
return os.date("(%Y/%m/%d)", t)
   return os.date("(%Y/%m/%d)", t)
end
end


function dateCov(v,d,t,type)
function dateCov(v, d, t, type)
if not(v and d) then return nil end
   if not(v and d) then return nil end
local box,a,b,c = mw.html.create( 'div' ),mw.html.create( 'div' ),mw.html.create( 'div' ),mw.html.create( 'div' )
   local box, a, b, c = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')
box:addClass( "date-box" )
   box:addClass("date-box")
a:wikitext(t)
   a:wikitext(t)
if type=="arg" 
   if type == "arg"
then
     then
b:wikitext(v..'<br>'..'('..tostring(d)..')')
     b:wikitext(v..'<br>' .. '('..tostring(d) .. ')')
else
   else
b:wikitext('v'..v..'<br>'..tostring(timeCov(d)))
     b:wikitext('v'..v..'<br>'..tostring(timeCov(d)))
end
   end
box:wikitext(tostring(a))
   box:wikitext(tostring(a))
  :wikitext(tostring(b))
   :wikitext(tostring(b))
  :wikitext(tostring(c))
   :wikitext(tostring(c))
return tostring(box)
   return tostring(box)
end
end


function bgCov(bg)
function bgCov(bg)
if bg==nil
   if bg == nil
then
     then
return nil
     return nil
else
   else
return '[[:分类:采用'..bg..'背景的曲目|'..bg..']]'
     return '[[:分类:采用'..bg..'背景的曲目|'..bg..']]'
end
   end
end
end


function bydMark(byd,name)
function choice(a, aKey, b, bKey)
local diff,mark = mw.html.create( 'div' ),mw.html.create( 'div' )
   if aKey then return a end
diff:wikitext('[Beyond]')
   if bKey then return b end
mark:wikitext('仅移动版')
if byd and name~='Tempestissimo'
then
return tostring(tostring(diff)..tostring(mark))
else
return tostring(diff)
end
end
end


function labelText(text,class)
function bydMark(byd, name)
local span = mw.html.create( 'span' )
   local diff, mark = mw.html.create('div'), mw.html.create('div')
span:addClass( 'label-text' )
   diff:wikitext('[Beyond]')
span:wikitext(text)
   mark:wikitext('仅移动版')
return tostring(span)
   if byd and name ~= 'Tempestissimo'
     then
     return tostring(tostring(diff)..tostring(mark))
   else
     return tostring(diff)
   end
end
end


function getImage(id,all,pst,prs,ftr,byd,second,normalJacketArgs,bydJacketArgs,normalJacketData,bydJacketData,bydyes,type)
function labelText(text, class)
local container,tab=mw.html.create('div'),mw.html.create('div')
   local span = mw.html.create('span')
local tab1,tab2,tab3,part1,part2,part3,jacket1,jacket2
   span:addClass('label-text')
container:addClass( 'container' )
   span:wikitext(text)
tab:attr( 'id','tab-'..type ) tab:addClass( 'img-tab' )
   return tostring(span)
end
local normalJacket,bydJacket
 
if normalJacketArgs
function getImage(id, all, pst, prs, ftr, byd, second, normalJacketArgs, bydJacketArgs, normalJacketData, bydJacketData, bydyes, type)
then
   --谢邀,这写的什么东西我自己都看不懂了
if bydJacketArgs
   local container, tab = mw.html.create('div'), mw.html.create('div')
then
   local tab1, tab2, tab3, part1, part2, part3, jacket1, jacket2
normalJacket,bydJacket=normalJacketArgs,bydJacketArgs
   container:addClass('container')
else
   tab:attr('id', 'tab-'..type) tab:addClass('img-tab')
normalJacket,bydJacket=normalJacketArgs,normalJacketArgs
 
end
   local normalJacket, bydJacket
else
   if normalJacketArgs
if normalJacketData=="" or normalJacketData==nil
     then
then
     if bydJacketArgs
normalJacket,bydJacket='未知','未知'
       then
else
       normalJacket, bydJacket = normalJacketArgs, bydJacketArgs
normalJacket,bydJacket=link({'画师',tostring(normalJacketData)}),link({'画师',tostring(bydJacketData)})
     else
end
       normalJacket, bydJacket = normalJacketArgs, normalJacketArgs
end
     end
   else
     if normalJacketData == "" or normalJacketData == nil
       then
       normalJacket, bydJacket = '未知', '未知'
     else
       normalJacket, bydJacket = link({'画师', tostring(normalJacketData)}), link({'画师', tostring(bydJacketData)})
     end
   end
 
   if pst and prs and ftr
     then
     tab1, tab2, tab3, part1, part2, part3 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')
 
     tab1:wikitext('Past') tab2:wikitext('Present') tab3:wikitext('Future')
     tab1:addClass('img-tab-part pst') tab2:addClass('img-tab-part prs') tab3:addClass('img-tab-part ftr')
     tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2)) tab:wikitext(tostring(tab3))
     container:wikitext(tostring(tab))
 
     part1:wikitext('[[文件:'..pst..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..prs..'|256px|none]]'..labelText('画师')..normalJacket) part3:wikitext('[[文件:'..ftr..'|256px|none]]'..labelText('画师')..normalJacket)
     part1:addClass('tab-text-'..type) part2:addClass('tab-text-'..type) part3:addClass('active tab-text-'..type)
     container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) container:wikitext(tostring(part3))
 
     return tostring(container)
   end
 
   if byd
     then
     tab1, tab2, part1, part2 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')
 
     tab1:wikitext('Normal') tab2:wikitext('Beyond')
     tab1:addClass('img-tab-part normal') tab2:addClass('img-tab-part byd')
     tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2))
     container:wikitext(tostring(tab))
 
     part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..byd..'|256px|none]]'..labelText('画师')..tostring(bydJacket))
     part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
     container:wikitext(tostring(part1)) container:wikitext(tostring(part2))
 
     return tostring(container)
   end
 
   if second
     then
     tab1, tab2, part1, part2 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')
 
     tab1:wikitext('第一曲绘') tab2:wikitext('第二曲绘')
     tab1:addClass('img-tab-part normal') tab2:addClass('img-tab-part normal')
     tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2))
     container:wikitext(tostring(tab))
 
     part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..second..'|256px|none]]'..labelText('画师')..normalJacket)
     part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
     container:wikitext(tostring(part1)) container:wikitext(tostring(part2))
 
     return tostring(container)
   end
 
   if id and bydyes
     then
     tab1, tab2, part1, part2 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')


if pst and prs and ftr
     tab1:wikitext('Normal') tab2:wikitext('Beyond')
then
     tab1:addClass('img-tab-part normal') tab2:addClass('img-tab-part byd')
tab1,tab2,tab3,part1,part2,part3=mw.html.create('div'),mw.html.create('div'),mw.html.create('div'),mw.html.create('div'),mw.html.create('div'),mw.html.create('div')
     tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2))
     container:wikitext(tostring(tab))


tab1:wikitext('Past') tab2:wikitext('Present') tab3:wikitext('Future')
     part1:wikitext('[[文件:Songs '..id..'.jpg|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:Songs '..id..' byd.jpg|256px|none]]'..labelText('画师')..tostring(bydJacket))
tab1:addClass('img-tab-part pst') tab2:addClass('img-tab-part prs') tab3:addClass('img-tab-part ftr')
     part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2)) tab:wikitext(tostring(tab3))
     container:wikitext(tostring(part1)) container:wikitext(tostring(part2))
container:wikitext(tostring(tab))
part1:wikitext('[[文件:'..pst..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..prs..'|256px|none]]'..labelText('画师')..normalJacket)  part3:wikitext('[[文件:'..ftr..'|256px|none]]'..labelText('画师')..normalJacket
part1:addClass('tab-text-'..type) part2:addClass('tab-text-'..type)  part3:addClass('active tab-text-'..type) 
container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) container:wikitext(tostring(part3))
return tostring(container)
end
if byd
then
tab1,tab2,part1,part2=mw.html.create('div'),mw.html.create('div'),mw.html.create('div'),mw.html.create('div')


tab1:wikitext('Normal') tab2:wikitext('Beyond')
     return tostring(container)
tab1:addClass('img-tab-part normal') tab2:addClass('img-tab-part byd')
   end
tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2))
container:wikitext(tostring(tab))
part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..byd..'|256px|none]]'..labelText('画师')..tostring(bydJacket))
part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
container:wikitext(tostring(part1)) container:wikitext(tostring(part2))
return tostring(container)
end
if second
then
tab1,tab2,part1,part2=mw.html.create('div'),mw.html.create('div'),mw.html.create('div'),mw.html.create('div')


tab1:wikitext('第一曲绘') tab2:wikitext('第二曲绘')
   if id
tab1:addClass('img-tab-part normal') tab2:addClass('img-tab-part normal')
     then
tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2))
     return '<div>[[文件:Songs '..id..'.jpg|256px|none]]'..labelText('画师')..normalJacket..'</div>'
container:wikitext(tostring(tab))
   end
part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText(' 画师')..normalJacket) part2:wikitext('[[文件:'..second..'|256px|none]]'..labelText('画师')..normalJacket)
part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
container:wikitext(tostring(part1)) container:wikitext(tostring(part2))
return tostring(container)
end
if id and bydyes
then
tab1,tab2,part1,part2=mw.html.create('div'),mw.html.create('div'),mw.html.create('div'),mw.html.create('div')


tab1:wikitext('Normal') tab2:wikitext('Beyond')
   return '<div>[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket..'</div>'
tab1:addClass('img-tab-part normal') tab2:addClass('img-tab-part byd')
tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2))
container:wikitext(tostring(tab))
part1:wikitext('[[文件:Songs '..id..'.jpg|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:Songs '..id..' byd.jpg|256px|none]]'..labelText('画师')..tostring(bydJacket))
part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
container:wikitext(tostring(part1)) container:wikitext(tostring(part2))
return tostring(container)
end
if id
then
return '<div>[[文件:Songs '..id..'.jpg|256px|none]]'..labelText('画师')..normalJacket..'</div>'
end
return '<div>[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket..'</div>'
end
end


function merge(list)
function merge(list)
local merge
   local merge
if list[4] then merge={1,1,1,1} else merge={1,1,1} end
   if list[4] then merge = {1, 1, 1, 1} else merge = {1, 1, 1} end
local o
   local o
if list[4] then o=4 else o=3 end
   if list[4] then o = 4 else o = 3 end
 
   if list[4] then
     if list[4] == list[3] then merge[3] = merge[3] + merge[4] merge[4] = 0 end
   end


if list[4] then
   if list[3] == list[2] then merge[2] = merge[2] + merge[3] merge[3] = 0 end
if list[4]==list[3] then merge[3]=merge[3]+merge[4] merge[4]=0 end
end


if list[3]==list[2] then merge[2]=merge[2]+merge[3] merge[3]=0 end
   if list[2] == list[1] then merge[1] = merge[1] + merge[2] merge[2] = 0 end


if list[2]==list[1] then merge[1]=merge[1]+merge[2] merge[2]=0 end
   for i = 1, o do
     if merge[i] == 0 then
       merge[i] = 'display:none'
     else
       merge[i] = 'grid-column-start: span '..merge[i] .. ';'
     end
   end


for i=1,o do
   return merge
if merge[i]==0 then
merge[i]='display:none'
else
merge[i]='grid-column-start: span '..merge[i]..';'
end
end
return merge
end
end


function re0()
function re0()
return nil
   return nil
end
end


function p.main(frame)
function p.main(frame)
local args = getArgs(frame)
   local args = getArgs(frame)
return p._main(args)
   return p._main(args)
end
end


function p._main(args)
function p._main(args)
local category=''
local data,dataNs
local argsLength = 0
for _,_ in pairs(args) do  argsLength=argsLength+1 end
if argsLength>=16
then
data,dataNs=re0,getData.getNS(args['曲名'])
else
data,dataNs=getData.getMobile(args['曲名']),getData.getNS(args['曲名'])
end
local byd
if args['Beyond等级'] or data('bydRating') then byd=true else byd=false end
local getChartDesigner={
[1]={ 'mobile' , 'PastNote编写' , 'note编写' , 'pstChartDesigner' },
[2]={ 'mobile' , 'PresentNote编写' , 'note编写' , 'prsChartDesigner' },
[3]={ 'mobile' , 'FutureNote编写' , 'note编写' , 'ftrChartDesigner' },
[4]={ 'mobile' , 'BeyondNote编写' , 'note编写' , 'bydChartDesigner' },
[5]={ 'ns' , 'PastNote编写NS' , 'note编写NS' , 'pstChartDesigner' },
[6]={ 'ns' , 'PresentNote编写NS' , 'note编写NS' , 'prsChartDesigner' },
[7]={ 'ns' , 'FutureNote编写NS' , 'note编写NS' , 'ftrChartDesigner' }
}
local chartDesigner={}
for i,k in ipairs(getChartDesigner)
do
if args[k[2]]
then
chartDesigner[i]=args[k[2]]
else
if args[k[3]]
then
chartDesigner[i]=args[k[3]]
else
if chartDesigner[i-1] and argsLength>=16 and i~=5 and i~=6 and i~=7
then
chartDesigner[i]=chartDesigner[i-1]
else
if k[1]=='mobile'
then
chartDesigner[i]=link({ '谱师',tostring(data(k[4])) })
else
chartDesigner[i]=link({ '谱师',tostring(dataNs(k[4])) })
end
end
end
end
end
local span,spanNs
if byd then
span=merge({ chartDesigner[1],chartDesigner[2],chartDesigner[3],chartDesigner[4] })
else
span=merge({ chartDesigner[1],chartDesigner[2],chartDesigner[3] })
end
spanNs=merge({ chartDesigner[1],chartDesigner[2],chartDesigner[3] })


if args['曲名']=='Tempestissimo' then spanNs={'grid-column-start: span 1','grid-column-start: span 1','grid-column-start: span 1','grid-column-start: span 1'}  end
   local data, dataNs = getData.getMobile(args['曲名']), getData.getNS(args[' 曲名'])
 
local imageA=getImage(data('id'),args[' 图片'],args['Past曲绘'],args['Present曲绘'],args['Future曲绘'],args['Beyond曲绘'],args[' 第二曲绘图片'],args[' 画师'],args['Beyond画师'],data('ftrJacketDesigner'),data('bydJacketDesigner'),byd,'a')
   local byd
local imageB=getImage(data('id'),args[' 图片'],args['Past曲绘'],args['Present曲绘'],args['Future曲绘'],args['Beyond曲绘'],args['第二曲绘图片'],args['画师'],args['Beyond画师'],data('ftrJacketDesigner'),data('bydJacketDesigner'),byd,'b')
   if args['Beyond等级'] or data('bydRating') then byd = true else byd = false end
local infoList={
 
[1]={
   local getChartDesigner = {
args['曲名'],data('title'),{ ['id']='title' }
     [1] = {'mobile', 'PastNote编写', 'note编写', 'pstChartDesigner'},
},
     [2] = {'mobile', 'PresentNote编写', 'note编写', 'prsChartDesigner'},
[2]={
     [3] = {'mobile', 'FutureNote编写', 'note编写', 'ftrChartDesigner'},
imageA,'image',{ ['id']='top-image' }
   [4] = {'mobile', 'BeyondNote编写', 'note编写', 'bydChartDesigner'}}
},
 
[3]={
   local chartDesigner = {}
imageB,'image',{ ['id']='right-image' }
   for i, k in ipairs(getChartDesigner)
},
     do
[4]={
       if args[k[2]]
'曲目信息','',{ ['class']='header' }
         then
},
         chartDesigner[i] = args[k[2]]
[5]={
       else
' 曲师','',{ ['class']='label' }
         if args[k[3]]
},
           then
[6]={
           chartDesigner[i] = args[k[3]]
args[' 编曲'],link({ ' 曲师',tostring(data('artist')) }),{ ['class']='data' }
         else
},
           if chartDesigner[i - 1]
[7]={
             then
'曲 ','',{ ['class']='label' }
             chartDesigner[i] = chartDesigner[i - 1]
},
           else
[8]={
             chartDesigner[i] = link({'谱师', tostring(data(k[4]))})
args[' 曲包'],getData.pack({data('set')}),{ ['class']='data' }
           end
},
         end
[9]={
       end
' 时长','',{ ['class']='label' }
     end
},
 
[10]={
     local span
args[' 时长'],' ',{ ['class']='data' }
     if byd then
},
       span = merge({chartDesigner[1], chartDesigner[2], chartDesigner[3], chartDesigner[4]})
[11]={
     else
'BPM','',{ ['class']='label' }
       span = merge({chartDesigner[1], chartDesigner[2], chartDesigner[3]})
},
     end
[12]={
 
args['BPM'],data('bpm'),{ ['class']='data' }
     -- if args['曲名'] == 'Tempestissimo' then spanNs = {'grid-column-start: span 1', 'grid-column-start: span 1', 'grid-column-start: span 1', 'grid-column-start: span 1'} end
},
 
[13]={
     local imageA = getImage(data('id'), args[' 图片'], args['Past曲绘'], args['Present曲绘'], args['Future '], args['Beyond曲绘'], args[' 第二曲绘图片'], args[' 画师'], args['Beyond画师'], data('ftrJacketDesigner'), data('bydJacketDesigner'), byd, 'a')
' 谱面信息','',{ ['class']='header' }
     local imageB = getImage(data('id'), args[' 图片'], args['Past曲绘'], args['Present曲绘'], args['Future曲绘'], args['Beyond曲绘'], args[' 第二曲绘图片'], args[' 画师'], args['Beyond画师'], data('ftrJacketDesigner'), data('bydJacketDesigner'), byd, 'b')
},
 
[14]={
     local infoList = {
' 难度','',{ ['class']='label' }
       [1] = {
},
         args[' 曲名'] or data('title') or dataNs('title'),
[15]={
       {id = 'title'}},
'[Past]','',{ ['class']='pst-label' }
       [2] = {
},
         imageA or choice('[[文件:Songs '..data('id') .. '.jpg|点此上传图片]]', data('id'), '[[文件:Songs '..dataNs('id') .. '.jpg|点此上传图片]]', dataNs('id')),
[16]={
       {id = 'top-image'}},
'[Present]','',{ ['class']='prs-label' }
       [3] = {
},
         imageB or choice('[[文件:Songs '..data('id') .. '.jpg|点此上传图片]]', data('id'), '[[ 文件:Songs '..dataNs('id') .. '.jpg|点此上传图片]]', dataNs('id')),
[17]={
       {id = 'right-image'}},
'[Future]','',{ ['class']='ftr-label' }
       [4] = {
},
         '曲 目信息',
[18]={
       {class = 'header'}},
bydMark(byd,args['曲 名']),'',{ ['class']='byd-label' }
       [5] = {
},
         ' 曲师',
[19]={
       {class = 'label'}},
'等级','',{ ['class']='label' }
       [6] = {
},
         args[' 编曲'] or link({'曲师', tostring(data('artist'))}) or link({' 曲师', tostring(dataNs('artist'))}),
[20]={
       {class = 'data'}},
args['Past等级'],data('pstRating'),{ ['class']='pst-data' }
       [7] = {
},
         ' 曲包',
[21]={
       {class = 'label'}},
args['Present等级'],data('prsRating'),{ ['class']='prs-data' }
       [8] = {
},
         args[' 曲包'] or getData.pack({data('set')}),
[22]={
       {class = 'data'}},
args['Future等级'],data('ftrRating'),{ ['class']='ftr-data' }
       [9] = {
},
         ' 时长',
[23]={
       {class = 'label'}},
args['Beyond等级'],data('bydRating'),{ ['class']='byd-data' }
       [10] = {
},
         args[' 时长'] or ' ',
[24]={
       {class = 'data'}},
'note数量','',{ ['class']='label' }
       [11] = {
},
         'BPM',
[25]={
       {class = 'label'}},
args['PastNote'],' ',{ ['class']='pst-data' }
       [12] = {
},
         args['BPM'] or data('bpm') or dataNs('bpm'),
[26]={
       {class = 'data'}},
args['PresentNote'],'空',{ ['class']='prs-data' }
       [13] = {
},
         ' 谱面信息',
[27]={
       {class = 'header'}},
args['FutureNote'],'空',{ ['class']='ftr-data' }
       [14] = {
},
         ' 难度',
[28]={
       {class = 'label'}},
args['BeyondNote'],'空',{ ['class']='byd-data' }
       [15] = {
},
         '[Past]',
[29]={
       {class = 'pst-label'}},
'谱面设计','',{ ['class']='label' }
       [16] = {
},
         '[Present]',
[30]={
       {class = 'prs-label'}},
chartDesigner[1],'无',{ ['class']='pst-data' },span[1]
       [17] = {
},
         '[Future]',
[31]={
       {class = 'ftr-label'}},
chartDesigner[2],' ',{ ['class']='prs-data' },span[2]
       [18] = {
},
         bydMark(byd, args[' 曲名']),
[32]={
       {class = 'byd-label'}},
chartDesigner[3],' ',{ ['class']='ftr-data' },span[3]
       [19] = {
},
         ' 等级',
[33]={
       {class = 'label'}},
chartDesigner[4],' ',{ ['class']='byd-data' },span[4]
       [20] = {
},
         args['Past等级'] or data('pstRating'),
[34]={
       {class = 'pst-data'}},
' 谱面信息(Joy-Con)','',{ ['class']='header ns',['id']='ns-play-header' }
       [21] = {
},
         args['Present等级'] or data('prsRating'),
[35]={
       {class = 'prs-data'}},
' 难度','',{ ['class']='label ns' }
       [22] = {
},
         args['Future等级'] or data('ftrRating'),
[36]={
       {class = 'ftr-data'}},
'[Past]','',{ ['class']='pst-label ns' }
       [23] = {
},
         args['Beyond等级'] or data('bydRating'),
[37]={
       {class = 'byd-data'}},
'[Present]','',{ ['class']='prs-label ns' }
       [24] = {
},
         'note数量',
[38]={
       {class = 'label'}},
'[Future]','',{ ['class']='ftr-label ns' }
       [25] = {
},
         args['PastNote'] or ' ',
[39]={
       {class = 'pst-data'}},
bydMark(byd,args[' 曲名']),'',{ ['class']='byd-label ns' }
       [26] = {
},
         args['PresentNote'] or ' ',
--[[   暂时无用部分,如有用则启用
       {class = 'prs-data'}},
[41]={
       [27] = {
' 等级','',{ ['class']='label ns' }
       args['FutureNote'] or ' ', {class = 'ftr-data'}},
},
       [28] = {
[42]={
         args['BeyondNote'] or '空',
args['Past等级NS'],dataNs('pstRating'),{ ['class']='pst-data ns' }
       {class = 'byd-data'}},
},
       [29] = {
[43]={
         ' 谱面设计',
args['Present等级NS'],dataNs('prsRating'),{ ['class']='prs-data ns' }
       {class = 'label'}},
},
       [30] = {
[44]={
         chartDesigner[1] or ' 空',
args['Future等级NS'],dataNs('ftrRating'),{ ['class']='ftr-data ns' }
       {class = 'pst-data'}, span[1]},
},
       [31] = {
[45]={
         chartDesigner[2] or ' ',
args['Beyond等级NS'],' ',{ ['class']='byd-data ns' }
       {class = 'prs-data'}, span[2]},
}, ]]--
       [32] = {
[40]={
         chartDesigner[3] or ' ',
'note数量','',{ ['class']='label ns' }
       {class = 'ftr-data'}, span[3]},
},
       [33] = {
[41]={
         chartDesigner[4] or ' ',
args['PastNoteNS'],args['PastNote'],{ ['class']='pst-data ns' }
       {class = 'byd-data'}, span[4]},
},
       [34] = {
[42]={
         ' 谱面信息(Joy-Con)',
args['PresentNoteNS'],args['PresentNote'],{ ['class']='prs-data ns' }
       {class = 'header ns', id = 'ns-play-header'}},
},
       [35] = {
[43]={
         ' 难度',
args['FutureNoteNS'],args['FutureNote'],{ ['class']='ftr-data ns' }
       {class = 'label ns'}},
},
       [36] = {
[44]={
         '[Past]',
args['BeyondNoteNS'],'无',{ ['class']='byd-data ns' }
       {class = 'pst-label ns'}},
},
       [37] = {
--[[   暂时无用部分,如有用则启用
         '[Present]',
[51]={
       {class = 'prs-label ns'}},
'谱面设计','',{ ['class']='label ns' }
       [38] = {
},
         '[Future]',
[52]={
       {class = 'ftr-label ns'}},
chartDesigner[5],chartDesigner[1],{ ['class']='pst-data ns' },spanNs[1]
       [39] = {
},
         bydMark(byd, args[' 曲名']),
[53]={
       {class = 'byd-label ns'}},
chartDesigner[6],chartDesigner[2],{ ['class']='prs-data ns' },spanNs[2]
       [40] = {
},
         'note数量',
[54]={
       {class = 'label ns'}},
chartDesigner[7],chartDesigner[3],{ ['class']='ftr-data ns' },spanNs[3]
       [41] = {
},
         args['PastNoteNS'] or args['PastNote'],
[55]={
       {class = 'pst-data ns'}},
args['BeyondNote编写NS'],'无',{ ['class']='byd-data ns' },spanNs[4]
       [42] = {
}, ]]--
         args['PresentNoteNS'] or args['PresentNote'],
[45]={
       {class = 'prs-data ns'}},
'背景','',{ ['class']='label' }
       [43] = {
},
         args['FutureNoteNS'] or args['FutureNote'],
[46]={
       {class = 'ftr-data ns'}},
bgCov(args['背景']),bgCov(data('bg')),{ ['class']='data' }
       [44] = {
},
         args['BeyondNoteNS'] or '无',
[47]={
       {class = 'byd-data ns'}},
'更新时间','',{ ['id']='update-data-label',['class']='label' }
       [45] = {
},
         '背景',
[48]={
       {class = 'label'}},
dateCov(args['更新版本'] , args['更新时间'] , labelText('移动版') , 'arg' ) , dateCov( data('version') , tonumber(data('date')) , labelText('移动版') , 'data' ) ,{ ['id']='mobile-date-normal',['class']='data'}
       [46] = {
},
         bgCov(args['背景']) or bgCov(data('bg')) or bgCov(dataNs('bg')),
[49]={
       {class = 'data'}},
dateCov(args['Beyond更新版本'] , args['Beyond更新时间'] ,labelText('移动版') , 'arg' ) ,' ',{ ['id']='mobile-date-byd',['class']='data'}
       [47] = {
},
         '更新时间',
[50]={
       {id = 'update-data-label', class = 'label'}},
dateCov(args['更新版本NS'] , args['更新时间NS'] , labelText('NS版') , 'arg' ),dateCov('v1.0.0c' ,'2021/05/18' , labelText('NS版') , 'arg' ),{ ['id']='ns-date-normal',['class']='data ns'}
       [48] = {
},
         dateCov(args['更新版本'], args['更新时间'], labelText('移动版'), 'arg') or dateCov(data('version'), tonumber(data('date')), labelText('移动版'), 'data'),
[51]={
       {id = 'mobile-date-normal', class = 'data'}},
'无','',{ ['id']='ns-date-byd',['class']='data ns'}
       [49] = {
}
         dateCov(args['Beyond更新版本'], args['Beyond更新时间'], labelText('移动版'), 'arg') or ' ',
}
       {id = 'mobile-date-byd', class = 'data'}},
       [50] = {
         dateCov(args['更新版本NS'], args['更新时间NS'], labelText('NS版'), 'arg') or ' ',
       {id = 'ns-date-normal', class = 'data ns'}},
       [51] = {
         '无',
       {id = 'ns-date-byd', class = 'data ns'}}}
 
       local box = mw.html.create('div')
 
       --样式控制
       box:addClass("songbox")
       if byd then box:addClass("byd") end
       if dataNs('side') == 1 or args['侧'] == '1' then box:addClass("conflict") else box:addClass("light") end
       if args['更新版本NS'] or dataNs('id')
         then
         box:addClass("ns-box")
         if not(dataNs('pstChange') or dataNs('prsChange') or dataNs('ftrChange')) --(or byd) -- bdy单独分栏禁用
           then
           box:addClass("ns-same")
         end
       end
       if args['Beyond更新版本'] and args['Beyond更新时间'] then box:addClass('mobile-byd-date') end
       if args['曲名'] == 'Tempestissimo' then box:addClass('ns-byd-date') box:addClass('ns-date-span') end
       if not(args['更新版本'] or args['更新时间'] or data('id')) then box:addClass('no-mobile') end
 
       --分类添加
       local category = ''
 
       if args['更新版本NS'] or dataNs('id')
         then
         if args['更新版本'] or args['更新时间'] or data('id')
           then
           category = category..'[[分类:双平台曲目]]'
         else
           category = category..'[[分类:NS版曲目]]'
         end
       else
         category = category..'[[分类:移动版曲目]]'
       end
 
       if dataNs('pstChange') or dataNs('prsChange') or dataNs('ftrChange') then category = category..'[[分类:多模式谱面有差异的曲目]]' end
       if args['nocat'] then category = '' end
 
       --表格生成
       local boxList = {}
 
       for i, o in ipairs(infoList) do
         boxList[i] = mw.html.create('div')
         boxList[i]
         :attr(infoList[i][2])
         :cssText(infoList[i][3])
         :wikitext(infoList[i][1])
         box:wikitext(tostring(boxList[i]))
       end


local box = mw.html.create( 'div' )
       return tostring(box)..category
     end
--样式控制
box:addClass( "songbox" )
if byd then box:addClass( "byd" ) end
if dataNs('side')==1 or args['侧']=='1' then box:addClass( "conflict" ) else box:addClass( "light" ) end
if args['更新版本NS'] or dataNs('id')
then
box:addClass( "ns-box" )
if not( dataNs('pstChange') or dataNs('prsChange') or dataNs('ftrChange') ) --(or byd) -- bdy单独分栏禁用
then
box:addClass( "ns-same" )
end
end
if args['Beyond更新版本'] and args['Beyond更新时间'] then box:addClass( 'mobile-byd-date' ) end
if args['曲名']=='Tempestissimo' then box:addClass( 'ns-byd-date' ) box:addClass( 'ns-date-span' )  end
if not(args['更新版本'] or args['更新时间'] or data('id')) then box:addClass( 'no-mobile' )  end
--分类添加
if args['更新版本NS'] or dataNs('id')
then
if args['更新版本'] or args['更新时间'] or data('id')
then
category=category..'[[分类:双平台曲目]]'
else
category=category..'[[分类:NS版曲目]]'
end
else
category=category..'[[分类:移动版曲目]]'
end
if dataNs('pstChange') or dataNs('prsChange') or dataNs('ftrChange') then category=category..'[[分类:多模式谱面有差异的曲目]]' end
if args['nocat'] then category='' end
--表格生成
local boxList={}
for i,o in ipairs(infoList) do
boxList[i] = mw.html.create( 'div' )
boxList[i]
:attr( infoList[i][3] )
:cssText( infoList[i][4] )
if infoList[i][1]
then
boxList[i]:wikitext( infoList[i][1] )
else
boxList[i]:wikitext( infoList[i][2] )
end
box:wikitext(tostring(boxList[i]))
end
return tostring(box)..category
end


return p
     return p

2021年7月20日 (二) 17:21的版本

可在Module:Songtable/doc创建此模块的帮助文档

local getArgs = require('Module:Arguments').getArgs
local link = require('Module:Link')._link
local getData = require("Module:data")
local p = {}

function timeCov(t)
    return os.date("(%Y/%m/%d)", t)
end

function dateCov(v, d, t, type)
    if not(v and d) then return nil end
    local box, a, b, c = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')
    box:addClass("date-box")
    a:wikitext(t)
    if type == "arg"
        then
        b:wikitext(v..'<br>' .. '('..tostring(d) .. ')')
    else
        b:wikitext('v'..v..'<br>'..tostring(timeCov(d)))
    end
    box:wikitext(tostring(a))
    :wikitext(tostring(b))
    :wikitext(tostring(c))
    return tostring(box)
end

function bgCov(bg)
    if bg == nil
        then
        return nil
    else
        return '[[:分类:采用'..bg..'背景的曲目|'..bg..']]'
    end
end

function choice(a, aKey, b, bKey)
    if aKey then return a end
    if bKey then return b end
end

function bydMark(byd, name)
    local diff, mark = mw.html.create('div'), mw.html.create('div')
    diff:wikitext('[Beyond]')
    mark:wikitext('仅移动版')
    if byd and name ~= 'Tempestissimo'
        then
        return tostring(tostring(diff)..tostring(mark))
    else
        return tostring(diff)
    end
end

function labelText(text, class)
    local span = mw.html.create('span')
    span:addClass('label-text')
    span:wikitext(text)
    return tostring(span)
end

function getImage(id, all, pst, prs, ftr, byd, second, normalJacketArgs, bydJacketArgs, normalJacketData, bydJacketData, bydyes, type)
    --谢邀,这写的什么东西我自己都看不懂了
    local container, tab = mw.html.create('div'), mw.html.create('div')
    local tab1, tab2, tab3, part1, part2, part3, jacket1, jacket2
    container:addClass('container')
    tab:attr('id', 'tab-'..type) tab:addClass('img-tab')

    local normalJacket, bydJacket
    if normalJacketArgs
        then
        if bydJacketArgs
            then
            normalJacket, bydJacket = normalJacketArgs, bydJacketArgs
        else
            normalJacket, bydJacket = normalJacketArgs, normalJacketArgs
        end
    else
        if normalJacketData == "" or normalJacketData == nil
            then
            normalJacket, bydJacket = '未知', '未知'
        else
            normalJacket, bydJacket = link({'画师', tostring(normalJacketData)}), link({'画师', tostring(bydJacketData)})
        end
    end

    if pst and prs and ftr
        then
        tab1, tab2, tab3, part1, part2, part3 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')

        tab1:wikitext('Past') tab2:wikitext('Present') tab3:wikitext('Future')
        tab1:addClass('img-tab-part pst') tab2:addClass('img-tab-part prs') tab3:addClass('img-tab-part ftr')
        tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2)) tab:wikitext(tostring(tab3))
        container:wikitext(tostring(tab))

        part1:wikitext('[[文件:'..pst..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..prs..'|256px|none]]'..labelText('画师')..normalJacket) part3:wikitext('[[文件:'..ftr..'|256px|none]]'..labelText('画师')..normalJacket)
        part1:addClass('tab-text-'..type) part2:addClass('tab-text-'..type) part3:addClass('active tab-text-'..type)
        container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) container:wikitext(tostring(part3))

        return tostring(container)
    end

    if byd
        then
        tab1, tab2, part1, part2 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')

        tab1:wikitext('Normal') tab2:wikitext('Beyond')
        tab1:addClass('img-tab-part normal') tab2:addClass('img-tab-part byd')
        tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2))
        container:wikitext(tostring(tab))

        part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..byd..'|256px|none]]'..labelText('画师')..tostring(bydJacket))
        part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
        container:wikitext(tostring(part1)) container:wikitext(tostring(part2))

        return tostring(container)
    end

    if second
        then
        tab1, tab2, part1, part2 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')

        tab1:wikitext('第一曲绘') tab2:wikitext('第二曲绘')
        tab1:addClass('img-tab-part normal') tab2:addClass('img-tab-part normal')
        tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2))
        container:wikitext(tostring(tab))

        part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..second..'|256px|none]]'..labelText('画师')..normalJacket)
        part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
        container:wikitext(tostring(part1)) container:wikitext(tostring(part2))

        return tostring(container)
    end

    if id and bydyes
        then
        tab1, tab2, part1, part2 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')

        tab1:wikitext('Normal') tab2:wikitext('Beyond')
        tab1:addClass('img-tab-part normal') tab2:addClass('img-tab-part byd')
        tab:wikitext(tostring(tab1)) tab:wikitext(tostring(tab2))
        container:wikitext(tostring(tab))

        part1:wikitext('[[文件:Songs '..id..'.jpg|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:Songs '..id..' byd.jpg|256px|none]]'..labelText('画师')..tostring(bydJacket))
        part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
        container:wikitext(tostring(part1)) container:wikitext(tostring(part2))

        return tostring(container)
    end

    if id
        then
        return '<div>[[文件:Songs '..id..'.jpg|256px|none]]'..labelText('画师')..normalJacket..'</div>'
    end

    return '<div>[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket..'</div>'
end

function merge(list)
    local merge
    if list[4] then merge = {1, 1, 1, 1} else merge = {1, 1, 1} end
    local o
    if list[4] then o = 4 else o = 3 end

    if list[4] then
        if list[4] == list[3] then merge[3] = merge[3] + merge[4] merge[4] = 0 end
    end

    if list[3] == list[2] then merge[2] = merge[2] + merge[3] merge[3] = 0 end

    if list[2] == list[1] then merge[1] = merge[1] + merge[2] merge[2] = 0 end

    for i = 1, o do
        if merge[i] == 0 then
            merge[i] = 'display:none'
        else
            merge[i] = 'grid-column-start: span '..merge[i] .. ';'
        end
    end

    return merge
end

function re0()
    return nil
end

function p.main(frame)
    local args = getArgs(frame)
    return p._main(args)
end

function p._main(args)

    local data, dataNs = getData.getMobile(args['曲名']), getData.getNS(args['曲名'])

    local byd
    if args['Beyond等级'] or data('bydRating') then byd = true else byd = false end

    local getChartDesigner = {
        [1] = {'mobile', 'PastNote编写', 'note编写', 'pstChartDesigner'},
        [2] = {'mobile', 'PresentNote编写', 'note编写', 'prsChartDesigner'},
        [3] = {'mobile', 'FutureNote编写', 'note编写', 'ftrChartDesigner'},
    [4] = {'mobile', 'BeyondNote编写', 'note编写', 'bydChartDesigner'}}

    local chartDesigner = {}
    for i, k in ipairs(getChartDesigner)
        do
            if args[k[2]]
                then
                chartDesigner[i] = args[k[2]]
            else
                if args[k[3]]
                    then
                    chartDesigner[i] = args[k[3]]
                else
                    if chartDesigner[i - 1]
                        then
                        chartDesigner[i] = chartDesigner[i - 1]
                    else
                        chartDesigner[i] = link({'谱师', tostring(data(k[4]))})
                    end
                end
            end
        end

        local span
        if byd then
            span = merge({chartDesigner[1], chartDesigner[2], chartDesigner[3], chartDesigner[4]})
        else
            span = merge({chartDesigner[1], chartDesigner[2], chartDesigner[3]})
        end

        -- if args['曲名'] == 'Tempestissimo' then spanNs = {'grid-column-start: span 1', 'grid-column-start: span 1', 'grid-column-start: span 1', 'grid-column-start: span 1'} end

        local imageA = getImage(data('id'), args['图片'], args['Past曲绘'], args['Present曲绘'], args['Future曲绘'], args['Beyond曲绘'], args['第二曲绘图片'], args['画师'], args['Beyond画师'], data('ftrJacketDesigner'), data('bydJacketDesigner'), byd, 'a')
        local imageB = getImage(data('id'), args['图片'], args['Past曲绘'], args['Present曲绘'], args['Future曲绘'], args['Beyond曲绘'], args['第二曲绘图片'], args['画师'], args['Beyond画师'], data('ftrJacketDesigner'), data('bydJacketDesigner'), byd, 'b')

        local infoList = {
            [1] = {
                args['曲名'] or data('title') or dataNs('title'),
            {id = 'title'}},
            [2] = {
                imageA or choice('[[文件:Songs '..data('id') .. '.jpg|点此上传图片]]', data('id'), '[[文件:Songs '..dataNs('id') .. '.jpg|点此上传图片]]', dataNs('id')),
            {id = 'top-image'}},
            [3] = {
                imageB or choice('[[文件:Songs '..data('id') .. '.jpg|点此上传图片]]', data('id'), '[[文件:Songs '..dataNs('id') .. '.jpg|点此上传图片]]', dataNs('id')),
            {id = 'right-image'}},
            [4] = {
                '曲目信息',
            {class = 'header'}},
            [5] = {
                '曲师',
            {class = 'label'}},
            [6] = {
                args['编曲'] or link({'曲师', tostring(data('artist'))}) or link({'曲师', tostring(dataNs('artist'))}),
            {class = 'data'}},
            [7] = {
                '曲包',
            {class = 'label'}},
            [8] = {
                args['曲包'] or getData.pack({data('set')}),
            {class = 'data'}},
            [9] = {
                '时长',
            {class = 'label'}},
            [10] = {
                args['时长'] or '空',
            {class = 'data'}},
            [11] = {
                'BPM',
            {class = 'label'}},
            [12] = {
                args['BPM'] or data('bpm') or dataNs('bpm'),
            {class = 'data'}},
            [13] = {
                '谱面信息',
            {class = 'header'}},
            [14] = {
                '难度',
            {class = 'label'}},
            [15] = {
                '[Past]',
            {class = 'pst-label'}},
            [16] = {
                '[Present]',
            {class = 'prs-label'}},
            [17] = {
                '[Future]',
            {class = 'ftr-label'}},
            [18] = {
                bydMark(byd, args['曲名']),
            {class = 'byd-label'}},
            [19] = {
                '等级',
            {class = 'label'}},
            [20] = {
                args['Past等级'] or data('pstRating'),
            {class = 'pst-data'}},
            [21] = {
                args['Present等级'] or data('prsRating'),
            {class = 'prs-data'}},
            [22] = {
                args['Future等级'] or data('ftrRating'),
            {class = 'ftr-data'}},
            [23] = {
                args['Beyond等级'] or data('bydRating'),
            {class = 'byd-data'}},
            [24] = {
                'note数量',
            {class = 'label'}},
            [25] = {
                args['PastNote'] or '空',
            {class = 'pst-data'}},
            [26] = {
                args['PresentNote'] or '空',
            {class = 'prs-data'}},
            [27] = {
            args['FutureNote'] or '空', {class = 'ftr-data'}},
            [28] = {
                args['BeyondNote'] or '空',
            {class = 'byd-data'}},
            [29] = {
                '谱面设计',
            {class = 'label'}},
            [30] = {
                chartDesigner[1] or '空',
            {class = 'pst-data'}, span[1]},
            [31] = {
                chartDesigner[2] or '空',
            {class = 'prs-data'}, span[2]},
            [32] = {
                chartDesigner[3] or '空',
            {class = 'ftr-data'}, span[3]},
            [33] = {
                chartDesigner[4] or '空',
            {class = 'byd-data'}, span[4]},
            [34] = {
                '谱面信息(Joy-Con)',
            {class = 'header ns', id = 'ns-play-header'}},
            [35] = {
                '难度',
            {class = 'label ns'}},
            [36] = {
                '[Past]',
            {class = 'pst-label ns'}},
            [37] = {
                '[Present]',
            {class = 'prs-label ns'}},
            [38] = {
                '[Future]',
            {class = 'ftr-label ns'}},
            [39] = {
                bydMark(byd, args['曲名']),
            {class = 'byd-label ns'}},
            [40] = {
                'note数量',
            {class = 'label ns'}},
            [41] = {
                args['PastNoteNS'] or args['PastNote'],
            {class = 'pst-data ns'}},
            [42] = {
                args['PresentNoteNS'] or args['PresentNote'],
            {class = 'prs-data ns'}},
            [43] = {
                args['FutureNoteNS'] or args['FutureNote'],
            {class = 'ftr-data ns'}},
            [44] = {
                args['BeyondNoteNS'] or '无',
            {class = 'byd-data ns'}},
            [45] = {
                '背景',
            {class = 'label'}},
            [46] = {
                bgCov(args['背景']) or bgCov(data('bg')) or bgCov(dataNs('bg')),
            {class = 'data'}},
            [47] = {
                '更新时间',
            {id = 'update-data-label', class = 'label'}},
            [48] = {
                dateCov(args['更新版本'], args['更新时间'], labelText('移动版'), 'arg') or dateCov(data('version'), tonumber(data('date')), labelText('移动版'), 'data'),
            {id = 'mobile-date-normal', class = 'data'}},
            [49] = {
                dateCov(args['Beyond更新版本'], args['Beyond更新时间'], labelText('移动版'), 'arg') or '无',
            {id = 'mobile-date-byd', class = 'data'}},
            [50] = {
                dateCov(args['更新版本NS'], args['更新时间NS'], labelText('NS版'), 'arg') or '无',
            {id = 'ns-date-normal', class = 'data ns'}},
            [51] = {
                '无',
            {id = 'ns-date-byd', class = 'data ns'}}}

            local box = mw.html.create('div')

            --样式控制
            box:addClass("songbox")
            if byd then box:addClass("byd") end
            if dataNs('side') == 1 or args['侧'] == '1' then box:addClass("conflict") else box:addClass("light") end
            if args['更新版本NS'] or dataNs('id')
                then
                box:addClass("ns-box")
                if not(dataNs('pstChange') or dataNs('prsChange') or dataNs('ftrChange')) --(or byd) -- bdy单独分栏禁用
                    then
                    box:addClass("ns-same")
                end
            end
            if args['Beyond更新版本'] and args['Beyond更新时间'] then box:addClass('mobile-byd-date') end
            if args['曲名'] == 'Tempestissimo' then box:addClass('ns-byd-date') box:addClass('ns-date-span') end
            if not(args['更新版本'] or args['更新时间'] or data('id')) then box:addClass('no-mobile') end

            --分类添加
            local category = ''

            if args['更新版本NS'] or dataNs('id')
                then
                if args['更新版本'] or args['更新时间'] or data('id')
                    then
                    category = category..'[[分类:双平台曲目]]'
                else
                    category = category..'[[分类:NS版曲目]]'
                end
            else
                category = category..'[[分类:移动版曲目]]'
            end

            if dataNs('pstChange') or dataNs('prsChange') or dataNs('ftrChange') then category = category..'[[分类:多模式谱面有差异的曲目]]' end
            if args['nocat'] then category = '' end

            --表格生成
            local boxList = {}

            for i, o in ipairs(infoList) do
                boxList[i] = mw.html.create('div')
                boxList[i]
                :attr(infoList[i][2])
                :cssText(infoList[i][3])
                :wikitext(infoList[i][1])
                box:wikitext(tostring(boxList[i]))
            end

            return tostring(box)..category
        end

        return p