Module:Live song
Documentation for this module may be created at Module:Live song/doc
local p = {}
function p._entry(name, title, note, cover, tease, abandoned)
local out = '"'
if cover ~= '' and (tease ~= '' or abandoned ~= '') then
if title == '' then
out = out .. name
else
out = out .. title
end
else
out = out .. '[[' .. name
if title ~= '' then
out = out .. '|' .. title
end
end
if not(cover ~= '' and (tease ~= '' or abandoned ~= '')) then
out = out .. ']]'
end
out = out .. '" '
if cover ~= '' then
out = out .. '[' .. cover .. '] '
end
if tease ~= '' and abandoned ~= '' then
out = out .. '(tease / abandoned) '
elseif tease ~= '' then
out = out .. '(tease) '
elseif abandoned ~= '' then
out = out .. '(abandoned) '
end
if note ~= '' then
out = out .. '(' .. note .. ')'
end
return out
end
function p.entry(frame)
local name = frame.args[1]
local title = frame.args[2]
local note = frame.args[3]
local cover = frame.args[4]
local tease = frame.args[5]
local abandoned = frame.args[6]
return p._entry(name, title, note, cover, tease, abandoned)
end
return p