Module:Smyth: Difference between revisions

Content deleted Content added
Remove pointless declarations of functions as local variables
Misc code cleanup, remove functions and variables used only once
 
Line 1:
local export = {}
 
local function Smyth(section, part)
data = {
["Smyth"] = {
["path"] = "1999.04.0007"
}
}
 
local function makeURL(resourceCode, part, code)
code = mw.uri.encode(code, "PATH")
return "http://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:" .. path .. ":" .. part .. "=" .. code
end
 
function Smyth(section, part)
if not part then
part = "smythp"
end
SmythData = data.Smyth
path = SmythData.path
local Part, url
if section == "" or section == nil then
Line 38 ⟶ 25:
end
end
code section = mw.uri.encode(codesection, "PATH")
url = makeURL(path, part, section)
return url = "http://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:" 1999.04. path .. "0007:" .. part .. "=" .. codesection
end
return { url = url, Part = Part }