置顶公告:【置顶】关于临时开启评论区所有功能的公告(2022.10.22) | 【置顶】关于本站Widget恢复使用的公告
  • 你好~!欢迎来到萌娘百科镜像站!如需查看或编辑,请联系本站管理员注册账号。
  • 本镜像站和其他萌娘百科的镜像站无关,请注意分别。

Module:Sandbox/Dyhdyh/sandbox

贴贴♀百科,万娘皆可贴的百科全书!转载请标注来源页面的网页链接,并声明引自贴贴百科。内容不可商用。
跳到导航 跳到搜索
Template-info.svg 模块文档  [查看] [编辑] [历史] [刷新]
歌曲 歌手 作词 作曲 编曲 单曲/专辑 发行公司 发售日期
片头曲(OP) 3分29秒 ヒトリエ シノダ ヒトリエ 3分29秒 HINICHIJOU RECORDS 2021年6月2日
片尾曲(ED) Avid SawanoHiroyuki[nZk]:mizuki cAnON 泽野弘之[1] Avid/Hands Up to the Sky SACRA MUSIC 2021年6月9日
Hands Up to the Sky SawanoHiroyuki[nZk]:Laco
  1. abc
  1. local p = {}
  2. local getArgs = require('Module:Arguments').getArgs
  3. function p.main(frame)
  4. local input={{},{},{},{},{},{}}
  5. local format={{{},{},{},{},{},{},{},{},{}},{{},{},{},{},{},{},{},{},{}},{{},{},{},{},{},{},{},{},{}},{{},{},{},{},{},{},{},{},{}},{{},{},{},{},{},{},{},{},{}},{{},{},{},{},{},{},{},{},{}},{{},{},{},{},{},{},{},{},{}}}
  6. local line = 0
  7. local column = 1
  8. local output = ''
  9. local op = frame:expandTemplate{title='color', args={'red', '片头曲(OP)'}}
  10. local ed = frame:expandTemplate{title='color', args={'blue', '片尾曲(ED)'}}
  11. local args = getArgs(frame)
  12. for init=1,54,1 do
  13. if frame.args[init] == 'OP' or frame.args[init] == 'op' or frame.args[init] == 'ED' or frame.args[init] == 'ed' then
  14. line = line+1
  15. column = 1
  16. input[line][10] = 0
  17. else
  18. column = column+1
  19. end
  20. input[line][column] = args[init]
  21. end
  22. for m=1,6,1 do
  23. for n=1,9,1 do
  24. if input[m][n] then
  25. local link = mw.ustring.match(input[m][n],'%[%[(.*)%]%]')
  26. local ref = mw.ustring.find(input[m][n],'<ref')
  27. if ref then
  28. format[m][n][4] = 1
  29. input[m][n] = mw.ustring.sub(input[m][n],1,ref-1)
  30. if link then
  31. format[m][n][3] = 1
  32. input[m][n] = link
  33. end
  34. else
  35. if link then
  36. format[m][n][3] = 1
  37. input[m][n] = link
  38. end
  39. end
  40. end
  41. end
  42. end
  43. for i=1,6,1 do
  44. for j=1,9,1 do
  45. format[i][j][1] = 1
  46. format[i][j][2] = 1
  47. if input[i][j] then
  48. for a= 1,8,1 do
  49. if input[i][j+a] == input[i][j] then
  50. format[i][j][1]=format[i][j][1]+1
  51. input[i][j+a] = nil
  52. else
  53. break
  54. end
  55. end
  56. end
  57. end
  58. end
  59. for p=1,6,1 do
  60. for q=1,9,1 do
  61. if input[p][q] then
  62. for b= 1,6,1 do
  63. if input[p+b][q] == input[p][q] and format[p+b][q][1] == format[p][q][1] then
  64. format[p][q][2]=format[p][q][2]+1
  65. input[p+b][q] = nil
  66. else
  67. break
  68. end
  69. end
  70. end
  71. end
  72. end
  73. for f=1,6,1 do
  74. for g=1,9,1 do
  75. if input[f][g] then
  76. if format[f][g][3] == 1 or format[f][g][4] == 1 then
  77. input[f][g] = frame.args[9*(f-1)+g]
  78. end
  79. end
  80. end
  81. end
  82. input[2][5] = frame.args[14]
  83. for x=1,6,1 do
  84. for y=1,9,1 do
  85. if input[x][y] == 'OP' or input[x][y] == 'op'then
  86. if format[x][y][2]~=1 then
  87. output = output..'|-\n!rowspan='..format[x][y][2]..'|'..op..'\n'
  88. else
  89. output = output.."|-\n!"..op..'\n'
  90. end
  91. end
  92. if input[x][y] == 'ED' or input[x][y] == 'ed' then
  93. if format[x][y][2]~=1 then
  94. output = output..'!rowspan='..format[x][y][2]..'|'..ed..'\n'
  95. else
  96. output = output.."!"..ed..'\n'
  97. end
  98. end
  99. if input[x][y] and input[x][y] ~= 'OP' and input [x][y] ~='ED' and input[x][y] ~= 'op' and input[x][y] ~= 'ed' and input[x][y+1] ~=0 then
  100. if format[x][y][1] == 1 then
  101. if format[x][y][2] == 1 then
  102. output = output..'||'..input[x][y]
  103. else
  104. output = output..'||rowspan='..format[x][y][2]..' style=\"text-align:center\"|'..input[x][y]
  105. end
  106. else
  107. if format[x][y][2] == 1 then
  108. output = output..'||colspan='..format[x][y][1]..' style=\"text-align:center\"|'..input[x][y]
  109. else
  110. output = output..'||colspan='..format[x][y][1]..' rowspan='..format[x][y][2]..' style=\"text-align:center\"|'..input[x][y]
  111. end
  112. end
  113. end
  114. if input[x][y+1] == 0 then
  115. if input[x][y] then
  116. if format[x][y][2] == 1 then
  117. output = output..'||'..input[x][y]..'\n|-\n'
  118. else
  119. output = output..'||rowspan='..format[x][y][2]..' style=\"text-align:center\"|'..input[x][y]..'\n|-\n'
  120. end
  121. else
  122. output = output..'\n|-\n'
  123. end
  124. end
  125. end
  126. end
  127. return output
  128. end
  129. return p