Module:Infobox MOS: Difference between revisions

Ganaram inukshuk (talk | contribs)
m Rearranged categories?
Ganaram inukshuk (talk | contribs)
No edit summary
Line 55: Line 55:
-- Add tuning category
-- Add tuning category
categories = categories .. "\n" .. string.format('[[Category:%s]]', tuning)
categories = categories .. string.format('[[Category:%s]]', tuning)
-- Add notecount category if the notecount is greater than 3
-- Add notecount category if the notecount is greater than 3
local notecount = input_mos.nL + input_mos.ns
local notecount = input_mos.nL + input_mos.ns
if notecount > 3 then
if notecount > 3 then
categories = categories .. "\n" .. string.format('[[Category:%d-tone scales]]', notecount)
categories = categories .. string.format('[[Category:%d-tone scales]]', notecount)
end
end
-- Add to nonoctave category if the equave is nonoctave
-- Add to nonoctave category if the equave is nonoctave
if not rat.eq(input_mos.equave, rat.new(2)) then
if not rat.eq(input_mos.equave, rat.new(2)) then
categories = categories .. "\n" .. '[[Category:Nonoctave]]'
categories = categories .. '[[Category:Nonoctave]]'
end
end
Line 280: Line 280:
)
)
if not debug_mode then
if not debug_mode then
result = p.categorize(tuning) .. '\n' .. result
result = result .. p.categorize(tuning)
end
end
return result
return result