Module:Pattern animation description

-- Returns a description of a pattern animation based on Juggling Lab terminology local z = {} function z.getDescription( frame ) local pattern = frame.args.pattern local hands  = frame.args.hands local bps    = frame.args.bps local dwell  = frame.args.dwell assert( pattern ~= '', "The 'pattern' parameter is missing." ) local list = "" local manual_settings = "" list = list .. "* Siteswap: " .. pattern manual_settings = manual_settings .. "pattern=" .. pattern .. ";"   if  hands ~= '' then list = list .. "\n* Hand movement: " .. hands manual_settings = manual_settings .. "hands=" .. hands .. ";"   end if bps ~= '' then list = list .. "\n* Beats per second: ".. bps manual_settings = manual_settings .. "bps=" .. bps .. ";"   end if dwell ~= '' then list = list .. "\n* Dwell beats: " .. dwell manual_settings = manual_settings .. "dwell=" .. dwell .. ";"   end list = list .. '\n* Manual settings: ' .. manual_settings .. ' '   local jugglinglab_url = "http://jugglinglab.sourceforge.net/siteswap.php?" .. manual_settings .. "colors=mixed;" -- escape two characters: '[' and ']' jugglinglab_url = string.gsub( jugglinglab_url, "%[", "%%5b" ) jugglinglab_url = string.gsub( jugglinglab_url, "%]", "%%5d" ) list = list .. "\n* [" .. jugglinglab_url .. " Juggling Lab animator]" return list end return z