Module:Infobox MOS: Difference between revisions

Ganaram inukshuk (talk | contribs)
args
ArrowHead294 (talk | contribs)
mNo edit summary
Line 131: Line 131:
{string.format("<b>%s</b>", section_header)},
{string.format("<b>%s</b>", section_header)},
{"[[Step pattern]]", step_pattern},
{"[[Step pattern]]", step_pattern},
{"[[Equave]]", string.format("%s (%.1f¢)", equave_as_string, equave_in_cents)},
{"[[Equave]]", string.format("%s (%.1f{{c}})", equave_as_string, equave_in_cents)},
{"[[Period]]", string.format("%s (%.1f¢)", period_as_string, period_in_cents)}
{"[[Period]]", string.format("%s (%.1f{{c}})", period_as_string, period_in_cents)}
}
}


Line 176: Line 176:
local section_entries = {
local section_entries = {
{string.format("<b>%s</b>%s", section_header, equave_annotation)},
{string.format("<b>%s</b>%s", section_header, equave_annotation)},
{"[[Bright]]", string.format("%s to %s (%.1f¢ to %.1f¢)", bright_min_in_steps, bright_max_in_steps, bright_min_in_cents, bright_max_in_cents)},
{"[[Bright]]", string.format("%s to %s (%.1f{{c}} to %.1f{{c}})", bright_min_in_steps, bright_max_in_steps, bright_min_in_cents, bright_max_in_cents)},
{"[[Dark]]", string.format("%s to %s (%.1f¢ to %.1f¢)", dark_min_in_steps, dark_max_in_steps, dark_min_in_cents, dark_max_in_cents)},
{"[[Dark]]", string.format("%s to %s (%.1f{{c}} to %.1f{{c}})", dark_min_in_steps, dark_max_in_steps, dark_min_in_cents, dark_max_in_cents)},
}
}
Line 382: Line 382:
local xenpaper_link = xp.mosstep_pattern_to_xenpaper_link(mos.brightest_mode(input_mos), step_ratios[i], input_mos.equave)
local xenpaper_link = xp.mosstep_pattern_to_xenpaper_link(mos.brightest_mode(input_mos), step_ratios[i], input_mos.equave)
local caption = string.format("[[%s]] [%s (L:s = %d:%d)]", step_ratio_name, xenpaper_link, step_ratio[1], step_ratio[2])
local caption = string.format("[[%s]] [%s (L:s = %d:%d)]", step_ratio_name, xenpaper_link, step_ratio[1], step_ratio[2])
local text = string.format("[[%s | %s]] (%.1f¢)", ed_as_string, gen_in_steps, gen_in_cents)
local text = string.format("[[%s | %s]] (%.1f{{c}})", ed_as_string, gen_in_steps, gen_in_cents)
table.insert(section_entries, { caption, text })
table.insert(section_entries, { caption, text })
Line 451: Line 451:
-- Wrapper function
-- Wrapper function
function p.infobox_MOS(frame)
function p.infobox_MOS(frame)
local tuning = frame.args["Tuning"]
local tuning = frame.args["Tuning"]
local other_names = frame.args["othernames"] or nil
local other_names = frame.args["othernames"] or nil
Line 461: Line 460:
end
end
return result
return frame:preprocess(result)
 
end
end


return p
return p