Module:SeasonVariables: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
return "''[[" .. full_name .. " (Anime)|" .. full_name .. "]]'' " .. string.sub(input, string.len(abbreviation) + 2) |
return "''[[" .. full_name .. " (Anime)|" .. full_name .. "]]'' " .. string.sub(input, string.len(abbreviation) + 2) |
||
elseif string.find(input, "TSKR") then |
elseif string.find(input, "TSKR") then |
||
if string.find(input, "(TV Drama)") then |
|||
return "''[[Thus Spoke Kishibe Rohan (TV Drama)|Thus Spoke Kishibe Rohan]]'' Episode " .. string.sub(input, string.len("TSKR Episode") + 2) |
|||
else |
|||
return "''[[Thus Spoke Kishibe Rohan (OVA)|Thus Spoke Kishibe Rohan]]'' Episode " .. string.sub(input, string.len("TSKR Episode") + 2) |
|||
end |
|||
end |
end |
||
end |
end |
Latest revision as of 17:42, 25 April 2024
Documentation for this module may be created at Module:SeasonVariables/doc
local p = {}
function p.main(frame)
local input = frame.args[1]
local abbreviations = {
PB = "Phantom Blood",
BT = "Battle Tendency",
SC = "Stardust Crusaders",
DU = "Diamond is Unbreakable",
GW = "Golden Wind",
SO = "Stone Ocean",
SBR = "Steel Ball Run",
JJL = "JoJolion",
TJL = "The JOJOLands"
}
for abbreviation, full_name in pairs(abbreviations) do
if not string.find(input, "(%w+) Episode") then
if string.find(input, "(OVA)") then
return "''[[JoJo's Bizarre Adventure (OVA)|JoJo's Bizarre Adventure]]'' Episode " .. string.sub(input, string.len("Episode") + 2)
else
return "''[[JoJo's Bizarre Adventure (Season)|JoJo's Bizarre Adventure]]'' Episode " .. string.sub(input, string.len("Episode") + 2)
end
elseif string.find(input, abbreviation) then
return "''[[" .. full_name .. " (Anime)|" .. full_name .. "]]'' " .. string.sub(input, string.len(abbreviation) + 2)
elseif string.find(input, "TSKR") then
if string.find(input, "(TV Drama)") then
return "''[[Thus Spoke Kishibe Rohan (TV Drama)|Thus Spoke Kishibe Rohan]]'' Episode " .. string.sub(input, string.len("TSKR Episode") + 2)
else
return "''[[Thus Spoke Kishibe Rohan (OVA)|Thus Spoke Kishibe Rohan]]'' Episode " .. string.sub(input, string.len("TSKR Episode") + 2)
end
end
end
return input
end
return p