Module:MOS mode degrees: Difference between revisions
ArrowHead294 (talk | contribs) On second thought, one cell per line is much easier to read on this table |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
local p = {} | |||
local mos = require("Module:MOS") | local mos = require("Module:MOS") | ||
local tamnams = require("Module:TAMNAMS") | |||
local tip = require("Module:Template input parse") | local tip = require("Module:Template input parse") | ||
local yesno = require("Module:Yesno") | local yesno = require("Module:Yesno") | ||
-- TODO | -- TODO | ||
| Line 112: | Line 113: | ||
-- If it's for a modmos, add the step pattern | -- If it's for a modmos, add the step pattern | ||
result = result .. "|+ style=\"font-size: 105%; white-space: nowrap;\" | " .. string.format("Scale degrees of the modes of %s", scale_sig) | result = result .. "|+ style=\"font-size: 105%; white-space: nowrap;\" | " .. string.format("Scale degrees of the modes of %s", scale_sig) | ||
.. (is_true_mos and "" or string.format(" (%s)", step_pattern)) | .. (is_true_mos and "\n" or string.format(" (%s)\n", step_pattern)) | ||
.. " | .. "|-\n" | ||
-- Add table headers for first row | -- Add table headers for first row | ||
| Line 148: | Line 149: | ||
local style_code = (cell_color == p.cell_color_none and "" or string.format("style=\"background: %s;\" | ", cell_color)) | local style_code = (cell_color == p.cell_color_none and "" or string.format("style=\"background: %s;\" | ", cell_color)) | ||
result = result .. string.format("| %s%s", style_code, degree_quality) | result = result .. string.format("| %s%s\n", style_code, degree_quality) | ||
end | end | ||
end | end | ||
| Line 166: | Line 166: | ||
local step_pattern = frame.args["MODMOS Step Pattern"] | local step_pattern = frame.args["MODMOS Step Pattern"] | ||
local mode_names_unparsed = frame.args["Mode Names"] | local mode_names_unparsed = frame.args["Mode Names"] | ||
-- Parse debugging option | |||
local debugg = yesno(frame.args["debug"]) | |||
-- Get the scale sig; for calculating the mos prefix | -- Get the scale sig; for calculating the mos prefix | ||
| Line 292: | Line 295: | ||
end | end | ||
-- Debugger option | |||
if debugg == true then | |||
result = "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>" | |||
end | |||
return frame:preprocess(result) | |||
end | end | ||
return p | return p | ||