Module:Ups and downs sharpness: Difference between revisions

Tristanbay (talk | contribs)
No edit summary
Tristanbay (talk | contribs)
No edit summary
Line 1: Line 1:
-- unfinished module!
-- unfinished module!
local p = {}
local p = ""
local utils = require("Module:Utils")
local utils = require("Module:Utils")


Line 11: Line 11:
function p.ud_sharpness(frame)
function p.ud_sharpness(frame)
local sharp = sharp_n(frame.args["edo"])
local sharp = sharp_n(frame.args["edo"])
local thead = {"{| class=\"wikitable center-all\"\n"}
local tab = "{| class="wikitable"\n|+\n!Step offset\n"
local tlabel = {"|-\n! Step offset\n{{!}}'''0'''"}
for i = 1, sharp * 2 + 2 do
local tsharp = {"|-\n! Sharp symbol\n| rowspan=\"2\" |  [[File:Heji18.svg|15px]]"}
if (i % sharp == 1) then
local tflat = {"|-\n! Flat symbol"}
tab = tab .. "|'''" .. i-1 .. "'''\n"
for i=1, (sharp*2+1) do
if i % sharp == 0 then
table.insert(tlabel, "'''" .. i .. "'''")
else
else
table.insert(tlabel, "" .. i)
tab = tab .. "|" .. i-1 .. "\n"
end
end
end
end
thead = thead .. table.concat(tlabel, "\n|") .. "\n|}"
return tab
return frame:preprocess(thead)
end
end


return p
return p