• Welcome to Touhou Wiki!
  • Registering is temporarily disabled. Check in our Discord server to request an account and for assistance of any kind.

Module:Test: Difference between revisions

From Touhou Wiki
Jump to navigation Jump to search
mNo edit summary
Tags: Mobile edit Mobile web edit
mNo edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
 
(239 intermediate revisions by the same user not shown)
Line 1: Line 1:
local p = {}
local export_table = {}
function p.main(frame)


--Get article
export_table.functionName = function (frame)
local args = frame.args
  local ISO = frame.args[1]
local title = args.title
  local Name = frame.args[2]
local title = mw.title.new(title)
  local data = mw.ext.externalData.getExternalData("some shit with "..ISO.." and "..Name.." or whatever")
local article = title:getContent()
   return data
local header = {}
local section = mw.text.split(article, "==.-==")
table.remove(section, 1)
local i = 1
 
--Get custom difficulties
local difficulty = {"Easy", "Medium", "Hard", "Lunatic"}
for k, v in ipairs(args) do
  difficulty[k] = v
end
 
--Split article
for s in string.gmatch(article, "==(.-)==") do
   header[s] = section[i]
  i = i+1
end
end


output = mw.text.nowiki(header["Suika Ibuki"])
return export_table
return output
end
return p

Latest revision as of 17:04, 19 March 2024

Documentation for this module may be created at Module:Test/doc

local export_table = {}

export_table.functionName = function (frame)
   local ISO = frame.args[1]
   local Name = frame.args[2]
   local data = mw.ext.externalData.getExternalData("some shit with "..ISO.." and "..Name.." or whatever")
   return data
end

return export_table