From 70f6795a402501bd1a951c2859d1e0090745242f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Tue, 7 Nov 2023 13:09:08 -0500 Subject: [PATCH 01/12] added spinner collection --- src/ProgressMeter.jl | 16 ++++--- src/spinners.jl | 112 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 7 deletions(-) create mode 100644 src/spinners.jl diff --git a/src/ProgressMeter.jl b/src/ProgressMeter.jl index 4b03c62..67fe1f3 100644 --- a/src/ProgressMeter.jl +++ b/src/ProgressMeter.jl @@ -388,18 +388,20 @@ function updateProgress!(p::ProgressThresh; showvalues = (), end end -const spinner_chars = ['◐','◓','◑','◒'] -const spinner_done = '✓' +include("spinners.jl") + +const default_spinner_chars = spinner_collection[8] +const default_spinner_done = '✓' spinner_char(p::ProgressUnknown, spinner::AbstractChar) = spinner -spinner_char(p::ProgressUnknown, spinner::AbstractVector{<:AbstractChar}) = - p.done ? spinner_done : spinner[p.spincounter % length(spinner) + firstindex(spinner)] +spinner_char(p::ProgressUnknown, spinner::Union{AbstractVector{<:AbstractChar}, AbstractVector{<:AbstractString}}) = + p.done ? default_spinner_done : spinner[p.spincounter % length(spinner) + firstindex(spinner)] spinner_char(p::ProgressUnknown, spinner::AbstractString) = - p.done ? spinner_done : spinner[nextind(spinner, 1, p.spincounter % length(spinner))] + p.done ? default_spinner_done : spinner[nextind(spinner, 1, p.spincounter % length(spinner))] function updateProgress!(p::ProgressUnknown; showvalues = (), truncate_lines = false, valuecolor = :blue, desc = p.desc, ignore_predictor = false, - spinner::Union{AbstractChar,AbstractString,AbstractVector{<:AbstractChar}} = spinner_chars, + spinner::Union{AbstractChar,AbstractString,AbstractVector{<:AbstractChar},AbstractVector{<:AbstractString}} = default_spinner_chars, offset::Integer = p.offset, keep = (offset == 0), color = p.color) !p.enabled && return @@ -442,7 +444,7 @@ function updateProgress!(p::ProgressUnknown; showvalues = (), truncate_lines = f if t > p.tlast+p.dt dur = durationstring(t-p.tinit) if p.spinner - msg = @sprintf "%c %s Time: %s" spinner_char(p, spinner) p.desc dur + msg = @sprintf " %s %s Time: %s" string(spinner_char(p, spinner)) p.desc dur p.spincounter += 1 else msg = @sprintf "%s %d Time: %s" p.desc p.counter dur diff --git a/src/spinners.jl b/src/spinners.jl new file mode 100644 index 0000000..56b31d0 --- /dev/null +++ b/src/spinners.jl @@ -0,0 +1,112 @@ +""" +Yoinked from https://github.com/briandowns/spinner + +Copyright (c) 2022 Brian J. Downs + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +const spinner_collection = Dict{UInt, Vector{String}}( + 1 => ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"], + 2 => ["▁", "▃", "▄", "▅", "▆", "▇", "█", "▇", "▆", "▅", "▄", "▃", "▁"], + 3 => ["▖", "▘", "▝", "▗"], + 4 => ["┤", "┘", "┴", "└", "├", "┌", "┬", "┐"], + 5 => ["◢", "◣", "◤", "◥"], + 6 => ["◰", "◳", "◲", "◱"], + 7 => ["◴", "◷", "◶", "◵"], + 8 => ["◐", "◓", "◑", "◒"], + 9 => [".", "o", "O", "@", "*"], + 10 => ["|", "/", "-", "\\"], + 11 => ["◡◡", "⊙⊙", "◠◠"], + 12 => ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"], + 13 => [">))'>", " >))'>", " >))'>", " >))'>", " >))'>", " <'((<", " <'((<", " <'((<"], + 14 => ["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"], + 15 => ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"], + 16 => ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], + 17 => ["▉", "▊", "▋", "▌", "▍", "▎", "▏", "▎", "▍", "▌", "▋", "▊", "▉"], + 18 => ["■", "□", "▪", "▫"], + 19 => ["←", "↑", "→", "↓"], + 20 => ["╫", "╪"], + 21 => ["⇐", "⇖", "⇑", "⇗", "⇒", "⇘", "⇓", "⇙"], + 22 => ["⠁", "⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈", "⠈"], + 23 => ["⠈", "⠉", "⠋", "⠓", "⠒", "⠐", "⠐", "⠒", "⠖", "⠦", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈"], + 24 => ["⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠴", "⠲", "⠒", "⠂", "⠂", "⠒", "⠚", "⠙", "⠉", "⠁"], + 25 => ["⠋", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋"], + 26 => ["ヲ", "ァ", "ィ", "ゥ", "ェ", "ォ", "ャ", "ュ", "ョ", "ッ", "ア", "イ", "ウ", "エ", "オ", "カ", "キ", "ク", "ケ", "コ", "サ", "シ", "ス", "セ", "ソ", "タ", "チ", "ツ", "テ", "ト", "ナ", "ニ", "ヌ", "ネ", "ノ", "ハ", "ヒ", "フ", "ヘ", "ホ", "マ", "ミ", "ム", "メ", "モ", "ヤ", "ユ", "ヨ", "ラ", "リ", "ル", "レ", "ロ", "ワ", "ン"], + 27 => [". ", ".. ", "..."], + 28 => ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█", "▉", "▊", "▋", "▌", "▍", "▎", "▏", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█", "▇", "▆", "▅", "▄", "▃", "▂", "▁"], + 29 => [".", "o", "O", "°", "O", "o", "."], + 30 => ["+", "x"], + 31 => ["v", "<", "^", ">"], + 32 => [">>--->", " >>--->", " >>--->", " >>--->", " >>--->", " <---<<", " <---<<", " <---<<", " <---<<", "<---<<"], + + # Original didn't have fixed width + 33 => ["| ", "|| ", "||| ", "|||| ", "||||| ", "|||||| ", "||||||| ", "||||||||", "||||||| ", "|||||| ", "||||| ", "|||| ", "||| ", "|| ", "| "], + + 34 => ["[ ]", "[= ]", "[== ]", "[=== ]", "[==== ]", "[===== ]", "[====== ]", "[======= ]", "[======== ]", "[========= ]", "[==========]"], + 35 => ["(*---------)", "(-*--------)", "(--*-------)", "(---*------)", "(----*-----)", "(-----*----)", "(------*---)", "(-------*--)", "(--------*-)", "(---------*)"], + 36 => ["█▒▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "█████▒▒▒▒▒", "███████▒▒▒", "██████████"], + 37 => ["[ ]", "[=> ]", "[===> ]", "[=====> ]", "[======> ]", "[========> ]", "[==========> ]", "[============> ]", "[==============> ]", "[================> ]", "[==================> ]", "[===================>]"], + 38 => ["🌍", "🌎", "🌏"], + 39 => ["◜", "◝", "◞", "◟"], + 40 => ["⬒", "⬔", "⬓", "⬕"], + 41 => ["⬖", "⬘", "⬗", "⬙"], + 42 => ["[>>> >]", "[]>>>> []", "[] >>>> []", "[] >>>> []", "[] >>>> []", "[] >>>>[]", "[>> >>]"], + 43 => ["♠", "♣", "♥", "♦"], + 44 => ["➞", "➟", "➠", "➡", "➠", "➟"], + 45 => [" | ", " \\ ", "_ ", " \\ ", " | ", " / ", " _", " / "], + 46 => [" . . . .", ". . . .", ". . . .", ". . . .", ". . . . ", ". . . . ."], + 47 => [" | ", " / ", " _ ", " \\ ", " | ", " \\ ", " _ ", " / "], + 48 => ["⎺", "⎻", "⎼", "⎽", "⎼", "⎻"], + 49 => ["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"], + 50 => ["[ ]", "[ =]", "[ ==]", "[ ===]", "[====]", "[=== ]", "[== ]", "[= ]"], + 51 => ["( ● )", "( ● )", "( ● )", "( ● )", "( ●)", "( ● )", "( ● )", "( ● )", "( ● )"], + 52 => ["✶", "✸", "✹", "✺", "✹", "✷"], + 53 => ["▐|\\____________▌", "▐_|\\___________▌", "▐__|\\__________▌", "▐___|\\_________▌", "▐____|\\________▌", "▐_____|\\_______▌", "▐______|\\______▌", "▐_______|\\_____▌", "▐________|\\____▌", "▐_________|\\___▌", "▐__________|\\__▌", "▐___________|\\_▌", "▐____________|\\▌", "▐____________/|▌", "▐___________/|_▌", "▐__________/|__▌", "▐_________/|___▌", "▐________/|____▌", "▐_______/|_____▌", "▐______/|______▌", "▐_____/|_______▌", "▐____/|________▌", "▐___/|_________▌", "▐__/|__________▌", "▐_/|___________▌", "▐/|____________▌"], + 54 => ["▐⠂ ▌", "▐⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂▌", "▐ ⠠▌", "▐ ⡀▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐⠠ ▌"], + 55 => ["¿", "?"], + 56 => ["⢹", "⢺", "⢼", "⣸", "⣇", "⡧", "⡗", "⡏"], + 57 => ["⢄", "⢂", "⢁", "⡁", "⡈", "⡐", "⡠"], + 58 => [". ", ".. ", "...", " ..", " .", " "], + 59 => [".", "o", "O", "°", "O", "o", "."], + 60 => ["▓", "▒", "░"], + 61 => ["▌", "▀", "▐", "▄"], + 62 => ["⊶", "⊷"], + 63 => ["▪", "▫"], + 64 => ["□", "■"], + 65 => ["▮", "▯"], + 66 => ["-", "=", "≡"], + 67 => ["d", "q", "p", "b"], + 68 => ["∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"], + 69 => ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "], + 70 => ["☗", "☖"], + 71 => ["⧇", "⧆"], + 72 => ["◉", "◎"], + 73 => ["㊂", "㊀", "㊁"], + 74 => ["⦾", "⦿"], + 75 => ["ဝ", "၀"], + 76 => ["▌", "▀", "▐▄"], + 77 => ["⠈⠁", "⠈⠑", "⠈⠱", "⠈⡱", "⢀⡱", "⢄⡱", "⢄⡱", "⢆⡱", "⢎⡱", "⢎⡰", "⢎⡠", "⢎⡀", "⢎⠁", "⠎⠁", "⠊⠁"], + 78 => ["________", "-_______", "_-______", "__-_____", "___-____", "____-___", "_____-__", "______-_", "_______-", "________", "_______-", "______-_", "_____-__", "____-___", "___-____", "__-_____", "_-______", "-_______", "________"], + 79 => ["|_______", "_/______", "__-_____", "___\\____", "____|___", "_____/__", "______-_", "_______\\", "_______|", "______\\_", "_____-__", "____/___", "___|____", "__\\_____", "_-______"], + 80 => ["□", "◱", "◧", "▣", "■"], + 81 => ["□", "◱", "▨", "▩", "■"], + 82 => ["░", "▒", "▓", "█"], + 83 => ["░", "█"], + 84 => ["⚪", "⚫"], + 85 => ["◯", "⬤"], + 86 => ["▱", "▰"], + 87 => ["➊", "➋", "➌", "➍", "➎", "➏", "➐", "➑", "➒", "➓"], + 88 => ["½", "⅓", "⅔", "¼", "¾", "⅛", "⅜", "⅝", "⅞"], + 89 => ["↞", "↟", "↠", "↡"] +) \ No newline at end of file From 3d9f2fc1093e240d2f349b56af9e6c2e26548d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Tue, 7 Nov 2023 22:56:09 -0500 Subject: [PATCH 02/12] we need zip_longest --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index 492608a..0d406c9 100644 --- a/Project.toml +++ b/Project.toml @@ -4,6 +4,7 @@ version = "1.9.0" [deps] Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" +IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" [compat] From 49ae6f9dca3ccf5e9382e0bdddff766eb9de5a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Tue, 7 Nov 2023 22:56:49 -0500 Subject: [PATCH 03/12] spinner collection + demo fct --- src/ProgressMeter.jl | 9 +- src/spinners.jl | 372 ++++++++++++++++++++++++++++++++----------- 2 files changed, 284 insertions(+), 97 deletions(-) diff --git a/src/ProgressMeter.jl b/src/ProgressMeter.jl index 67fe1f3..a921325 100644 --- a/src/ProgressMeter.jl +++ b/src/ProgressMeter.jl @@ -388,20 +388,23 @@ function updateProgress!(p::ProgressThresh; showvalues = (), end end +export spinnercollection, demospinners include("spinners.jl") -const default_spinner_chars = spinner_collection[8] +const default_spinner_chars = spinnercollection[8] const default_spinner_done = '✓' spinner_char(p::ProgressUnknown, spinner::AbstractChar) = spinner spinner_char(p::ProgressUnknown, spinner::Union{AbstractVector{<:AbstractChar}, AbstractVector{<:AbstractString}}) = p.done ? default_spinner_done : spinner[p.spincounter % length(spinner) + firstindex(spinner)] +spinner_char(p::ProgressUnknown, spinner::Int) = + p.done ? default_spinner_done : spinnercollection[spinner][p.spincounter % length(spinnercollection[spinner]) + firstindex(spinnercollection[spinner])] spinner_char(p::ProgressUnknown, spinner::AbstractString) = p.done ? default_spinner_done : spinner[nextind(spinner, 1, p.spincounter % length(spinner))] function updateProgress!(p::ProgressUnknown; showvalues = (), truncate_lines = false, valuecolor = :blue, desc = p.desc, ignore_predictor = false, - spinner::Union{AbstractChar,AbstractString,AbstractVector{<:AbstractChar},AbstractVector{<:AbstractString}} = default_spinner_chars, + spinner::Union{AbstractChar,AbstractString,AbstractVector{<:AbstractChar},AbstractVector{<:AbstractString}, Int} = default_spinner_chars, offset::Integer = p.offset, keep = (offset == 0), color = p.color) !p.enabled && return @@ -414,7 +417,7 @@ function updateProgress!(p::ProgressUnknown; showvalues = (), truncate_lines = f elapsed_time = t - p.tinit dur = durationstring(elapsed_time) if p.spinner - msg = @sprintf "%c %s Time: %s" spinner_char(p, spinner) p.desc dur + msg = @sprintf "%s %s Time: %s" spinner_char(p, spinner) p.desc dur p.spincounter += 1 else msg = @sprintf "%s %d Time: %s" p.desc p.counter dur diff --git a/src/spinners.jl b/src/spinners.jl index 56b31d0..d1d1206 100644 --- a/src/spinners.jl +++ b/src/spinners.jl @@ -1,5 +1,5 @@ """ -Yoinked from https://github.com/briandowns/spinner +Spinners 1-89 yoinked from https://github.com/briandowns/spinner Copyright (c) 2022 Brian J. Downs @@ -16,97 +16,281 @@ See the License for the specific language governing permissions and limitations under the License. """ -const spinner_collection = Dict{UInt, Vector{String}}( - 1 => ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"], - 2 => ["▁", "▃", "▄", "▅", "▆", "▇", "█", "▇", "▆", "▅", "▄", "▃", "▁"], - 3 => ["▖", "▘", "▝", "▗"], - 4 => ["┤", "┘", "┴", "└", "├", "┌", "┬", "┐"], - 5 => ["◢", "◣", "◤", "◥"], - 6 => ["◰", "◳", "◲", "◱"], - 7 => ["◴", "◷", "◶", "◵"], - 8 => ["◐", "◓", "◑", "◒"], - 9 => [".", "o", "O", "@", "*"], - 10 => ["|", "/", "-", "\\"], - 11 => ["◡◡", "⊙⊙", "◠◠"], - 12 => ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"], - 13 => [">))'>", " >))'>", " >))'>", " >))'>", " >))'>", " <'((<", " <'((<", " <'((<"], - 14 => ["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"], - 15 => ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"], - 16 => ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], - 17 => ["▉", "▊", "▋", "▌", "▍", "▎", "▏", "▎", "▍", "▌", "▋", "▊", "▉"], - 18 => ["■", "□", "▪", "▫"], - 19 => ["←", "↑", "→", "↓"], - 20 => ["╫", "╪"], - 21 => ["⇐", "⇖", "⇑", "⇗", "⇒", "⇘", "⇓", "⇙"], - 22 => ["⠁", "⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈", "⠈"], - 23 => ["⠈", "⠉", "⠋", "⠓", "⠒", "⠐", "⠐", "⠒", "⠖", "⠦", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈"], - 24 => ["⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠴", "⠲", "⠒", "⠂", "⠂", "⠒", "⠚", "⠙", "⠉", "⠁"], - 25 => ["⠋", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋"], - 26 => ["ヲ", "ァ", "ィ", "ゥ", "ェ", "ォ", "ャ", "ュ", "ョ", "ッ", "ア", "イ", "ウ", "エ", "オ", "カ", "キ", "ク", "ケ", "コ", "サ", "シ", "ス", "セ", "ソ", "タ", "チ", "ツ", "テ", "ト", "ナ", "ニ", "ヌ", "ネ", "ノ", "ハ", "ヒ", "フ", "ヘ", "ホ", "マ", "ミ", "ム", "メ", "モ", "ヤ", "ユ", "ヨ", "ラ", "リ", "ル", "レ", "ロ", "ワ", "ン"], - 27 => [". ", ".. ", "..."], - 28 => ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█", "▉", "▊", "▋", "▌", "▍", "▎", "▏", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█", "▇", "▆", "▅", "▄", "▃", "▂", "▁"], - 29 => [".", "o", "O", "°", "O", "o", "."], - 30 => ["+", "x"], - 31 => ["v", "<", "^", ">"], - 32 => [">>--->", " >>--->", " >>--->", " >>--->", " >>--->", " <---<<", " <---<<", " <---<<", " <---<<", "<---<<"], - - # Original didn't have fixed width - 33 => ["| ", "|| ", "||| ", "|||| ", "||||| ", "|||||| ", "||||||| ", "||||||||", "||||||| ", "|||||| ", "||||| ", "|||| ", "||| ", "|| ", "| "], +using IterTools: zip_longest +using Base.Iterators: partition - 34 => ["[ ]", "[= ]", "[== ]", "[=== ]", "[==== ]", "[===== ]", "[====== ]", "[======= ]", "[======== ]", "[========= ]", "[==========]"], - 35 => ["(*---------)", "(-*--------)", "(--*-------)", "(---*------)", "(----*-----)", "(-----*----)", "(------*---)", "(-------*--)", "(--------*-)", "(---------*)"], - 36 => ["█▒▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "█████▒▒▒▒▒", "███████▒▒▒", "██████████"], - 37 => ["[ ]", "[=> ]", "[===> ]", "[=====> ]", "[======> ]", "[========> ]", "[==========> ]", "[============> ]", "[==============> ]", "[================> ]", "[==================> ]", "[===================>]"], - 38 => ["🌍", "🌎", "🌏"], - 39 => ["◜", "◝", "◞", "◟"], - 40 => ["⬒", "⬔", "⬓", "⬕"], - 41 => ["⬖", "⬘", "⬗", "⬙"], - 42 => ["[>>> >]", "[]>>>> []", "[] >>>> []", "[] >>>> []", "[] >>>> []", "[] >>>>[]", "[>> >>]"], - 43 => ["♠", "♣", "♥", "♦"], - 44 => ["➞", "➟", "➠", "➡", "➠", "➟"], - 45 => [" | ", " \\ ", "_ ", " \\ ", " | ", " / ", " _", " / "], - 46 => [" . . . .", ". . . .", ". . . .", ". . . .", ". . . . ", ". . . . ."], - 47 => [" | ", " / ", " _ ", " \\ ", " | ", " \\ ", " _ ", " / "], - 48 => ["⎺", "⎻", "⎼", "⎽", "⎼", "⎻"], - 49 => ["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"], - 50 => ["[ ]", "[ =]", "[ ==]", "[ ===]", "[====]", "[=== ]", "[== ]", "[= ]"], - 51 => ["( ● )", "( ● )", "( ● )", "( ● )", "( ●)", "( ● )", "( ● )", "( ● )", "( ● )"], - 52 => ["✶", "✸", "✹", "✺", "✹", "✷"], - 53 => ["▐|\\____________▌", "▐_|\\___________▌", "▐__|\\__________▌", "▐___|\\_________▌", "▐____|\\________▌", "▐_____|\\_______▌", "▐______|\\______▌", "▐_______|\\_____▌", "▐________|\\____▌", "▐_________|\\___▌", "▐__________|\\__▌", "▐___________|\\_▌", "▐____________|\\▌", "▐____________/|▌", "▐___________/|_▌", "▐__________/|__▌", "▐_________/|___▌", "▐________/|____▌", "▐_______/|_____▌", "▐______/|______▌", "▐_____/|_______▌", "▐____/|________▌", "▐___/|_________▌", "▐__/|__________▌", "▐_/|___________▌", "▐/|____________▌"], - 54 => ["▐⠂ ▌", "▐⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂▌", "▐ ⠠▌", "▐ ⡀▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐⠠ ▌"], - 55 => ["¿", "?"], - 56 => ["⢹", "⢺", "⢼", "⣸", "⣇", "⡧", "⡗", "⡏"], - 57 => ["⢄", "⢂", "⢁", "⡁", "⡈", "⡐", "⡠"], - 58 => [". ", ".. ", "...", " ..", " .", " "], - 59 => [".", "o", "O", "°", "O", "o", "."], - 60 => ["▓", "▒", "░"], - 61 => ["▌", "▀", "▐", "▄"], - 62 => ["⊶", "⊷"], - 63 => ["▪", "▫"], - 64 => ["□", "■"], - 65 => ["▮", "▯"], - 66 => ["-", "=", "≡"], - 67 => ["d", "q", "p", "b"], - 68 => ["∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"], - 69 => ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "], - 70 => ["☗", "☖"], - 71 => ["⧇", "⧆"], - 72 => ["◉", "◎"], - 73 => ["㊂", "㊀", "㊁"], - 74 => ["⦾", "⦿"], - 75 => ["ဝ", "၀"], - 76 => ["▌", "▀", "▐▄"], - 77 => ["⠈⠁", "⠈⠑", "⠈⠱", "⠈⡱", "⢀⡱", "⢄⡱", "⢄⡱", "⢆⡱", "⢎⡱", "⢎⡰", "⢎⡠", "⢎⡀", "⢎⠁", "⠎⠁", "⠊⠁"], - 78 => ["________", "-_______", "_-______", "__-_____", "___-____", "____-___", "_____-__", "______-_", "_______-", "________", "_______-", "______-_", "_____-__", "____-___", "___-____", "__-_____", "_-______", "-_______", "________"], - 79 => ["|_______", "_/______", "__-_____", "___\\____", "____|___", "_____/__", "______-_", "_______\\", "_______|", "______\\_", "_____-__", "____/___", "___|____", "__\\_____", "_-______"], - 80 => ["□", "◱", "◧", "▣", "■"], - 81 => ["□", "◱", "▨", "▩", "■"], - 82 => ["░", "▒", "▓", "█"], - 83 => ["░", "█"], - 84 => ["⚪", "⚫"], - 85 => ["◯", "⬤"], - 86 => ["▱", "▰"], - 87 => ["➊", "➋", "➌", "➍", "➎", "➏", "➐", "➑", "➒", "➓"], - 88 => ["½", "⅓", "⅔", "¼", "¾", "⅛", "⅜", "⅝", "⅞"], - 89 => ["↞", "↟", "↠", "↡"] -) \ No newline at end of file +function demospinners(spinnerset::AbstractVector{<:AbstractString}; delay=0.11) + demospinners([spinnerset], delay=delay) +end + +function demospinners(spinnerset::Union{AbstractString, AbstractVector{<:AbstractChar}}; delay=0.11) + demospinners([collect(spinnerset)], delay=delay) +end + +function demospinners(spinneridx::Int; delay=0.11) + demospinners([spinnercollection[spinneridx]], delay=delay) +end + +function demospinners(spinnerset=spinnercollection; delay=0.11) + th, tw = displaysize(stdout) + + lenmaxidx = length("$(lastindex(spinnerset))") + # length("[idx] spinnerstring ") + # ^ ^^ ^ = +4 + fixedlengths = textwidth.(first.(spinnerset)) .+ 4 .+ lenmaxidx + w = 1 + for _ in 1:length(fixedlengths) + irreg_grid = collect.(partition(fixedlengths, w)) + colwidths = maximum.(zip_longest(irreg_grid...; default=0)) + if sum(colwidths) > tw + w -= 1 + break + end + w += 1 + end + irreg_grid = collect.(partition(fixedlengths, w)) + colwidths = maximum.(zip_longest(irreg_grid...; default=0)) + spinnergrid = partition(spinnerset, w) + idxgrid = partition(1:length(spinnerset), w) + spincountergrid = collect.(partition(fill(0, length(spinnerset)), w)) + + while true + for (i, (spinner_row, idx_row)) in enumerate(zip(spinnergrid, idxgrid)) + for (j, (spinner_charset, idx, colwidth)) in enumerate(zip(spinner_row, idx_row, colwidths)) + + msg = @sprintf "\u1b[34m[%s]\u1b[39m %s " lpad("$idx", lenmaxidx) spinner_charset[spincountergrid[i][j]+1] + # ^^^^ ^^^^ = +8 + msg = rpad(msg, colwidth + 8) # +8 accounts for ANSI escape sequences. + # textwidth used by lpad/rpad does not count \u1b + print(msg) + spincountergrid[i][j] = (spincountergrid[i][j] + 1) % length(spinner_charset) + end + print("\n") + end + print("\r\u1b[A"^length(spinnergrid)) + sleep(delay) + end +end + +spinnercollection = [ + # 1 + ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"], + # 2 + ["▁", "▃", "▄", "▅", "▆", "▇", "█", "▇", "▆", "▅", "▄", "▃", "▁"], + # 3 + ["▖", "▘", "▝", "▗"], + # 4 + ["┤", "┘", "┴", "└", "├", "┌", "┬", "┐"], + # 5 + ["◢", "◣", "◤", "◥"], + # 6 + ["◰", "◳", "◲", "◱"], + # 7 + ["◴", "◷", "◶", "◵"], + # 8 + ["◐", "◓", "◑", "◒"], + # 9 + [".", "o", "O", "@", "*"], + # 10 + ["|", "/", "-", "\\"], + # 11 + ["◡◡", "⊙⊙", "◠◠"], + # 12 + ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"], + # 13 + [">))'> ", " >))'> ", " >))'> ", " >))'> ", " >))'>", " <'((< ", " <'((< ", " <'((< "], + # 14 + ["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"], + # 15 + ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"], + # 16 + ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], + # 17 + ["▉", "▊", "▋", "▌", "▍", "▎", "▏", "▎", "▍", "▌", "▋", "▊", "▉"], + # 18 + ["■", "□", "▪", "▫"], + # 19 + ["←", "↑", "→", "↓"], + # 20 + ["╫", "╪"], + # 21 + ["⇐", "⇖", "⇑", "⇗", "⇒", "⇘", "⇓", "⇙"], + # 22 + ["⠁", "⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈", "⠈"], + # 23 + ["⠈", "⠉", "⠋", "⠓", "⠒", "⠐", "⠐", "⠒", "⠖", "⠦", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈"], + # 24 + ["⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠴", "⠲", "⠒", "⠂", "⠂", "⠒", "⠚", "⠙", "⠉", "⠁"], + # 25 + ["⠋", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋"], + # 26 + ["ヲ", "ァ", "ィ", "ゥ", "ェ", "ォ", "ャ", "ュ", "ョ", "ッ", "ア", "イ", "ウ", "エ", "オ", "カ", "キ", "ク", "ケ", "コ", "サ", "シ", "ス", "セ", "ソ", "タ", "チ", "ツ", "テ", "ト", "ナ", "ニ", "ヌ", "ネ", "ノ", "ハ", "ヒ", "フ", "ヘ", "ホ", "マ", "ミ", "ム", "メ", "モ", "ヤ", "ユ", "ヨ", "ラ", "リ", "ル", "レ", "ロ", "ワ", "ン"], + # 27 + [". ", ".. ", "..."], + # 28 + ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█", "▉", "▊", "▋", "▌", "▍", "▎", "▏", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█", "▇", "▆", "▅", "▄", "▃", "▂", "▁"], + # 29 + [".", "o", "O", "°", "O", "o", "."], + # 30 + ["+", "x"], + # 31 + ["v", "<", "^", ">"], + # 32 + [">>---> ", " >>---> ", " >>---> ", " >>---> ", " >>--->", " <---<<", " <---<< ", " <---<< ", " <---<< ", "<---<< "], + # 33 original didn't have fixed width + ["| ", "|| ", "||| ", "|||| ", "||||| ", "|||||| ", "||||||| ", "||||||||", "||||||| ", "|||||| ", "||||| ", "|||| ", "||| ", "|| ", "| "], + # 34 + ["[ ]", "[= ]", "[== ]", "[=== ]", "[==== ]", "[===== ]", "[====== ]", "[======= ]", "[======== ]", "[========= ]", "[==========]"], + # 35 + ["(*---------)", "(-*--------)", "(--*-------)", "(---*------)", "(----*-----)", "(-----*----)", "(------*---)", "(-------*--)", "(--------*-)", "(---------*)"], + # 36 + ["█▒▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "█████▒▒▒▒▒", "███████▒▒▒", "██████████"], + # 37 + ["[ ]", "[> ]", "[=> ]", "[===> ]", "[=====> ]", "[======> ]", "[========> ]", "[=========>]", "[ =========]", "[ ========]", "[ =======]", "[ ======]", "[ =====]", "[ ====]", "[ ===]", "[ ==]", "[ =]"], + # 38 + ["🌍", "🌎", "🌏"], + # 39 + ["◜", "◝", "◞", "◟"], + # 40 + ["⬒", "⬔", "⬓", "⬕"], + # 41 + ["⬖", "⬘", "⬗", "⬙"], + # 42 + ["[>>> >]", "[]>>>> []", "[] >>>> []", "[] >>>> []", "[] >>>> []", "[] >>>>[]", "[>> >>]"], + # 43 + ["♠", "♣", "♥", "♦"], + # 44 + ["➞", "➟", "➠", "➡", "➠", "➟"], + # 45 + [" | ", " \\ ", "_ ", " \\ ", " | ", " / ", " _", " / "], + # 46 + [" . . . .", ". . . .", ". . . .", ". . . .", ". . . . ", ". . . . ."], + # 47 + [" | ", " / ", " _ ", " \\ ", " | ", " \\ ", " _ ", " / "], + # 48 + ["⎺", "⎻", "⎼", "⎽", "⎼", "⎻"], + # 49 + ["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"], + # 50 + ["[ ]", "[ =]", "[ ==]", "[ ===]", "[====]", "[=== ]", "[== ]", "[= ]"], + # 51 + ["( ● )", "( ● )", "( ● )", "( ● )", "( ●)", "( ● )", "( ● )", "( ● )", "( ● )"], + # 52 + ["✶", "✸", "✹", "✺", "✹", "✷"], + # 53 + ["▐|\\____________▌", "▐_|\\___________▌", "▐__|\\__________▌", "▐___|\\_________▌", "▐____|\\________▌", "▐_____|\\_______▌", "▐______|\\______▌", "▐_______|\\_____▌", "▐________|\\____▌", "▐_________|\\___▌", "▐__________|\\__▌", "▐___________|\\_▌", "▐____________|\\▌", "▐____________/|▌", "▐___________/|_▌", "▐__________/|__▌", "▐_________/|___▌", "▐________/|____▌", "▐_______/|_____▌", "▐______/|______▌", "▐_____/|_______▌", "▐____/|________▌", "▐___/|_________▌", "▐__/|__________▌", "▐_/|___________▌", "▐/|____________▌"], + # 54 + ["▐⠂ ▌", "▐⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂▌", "▐ ⠠▌", "▐ ⡀▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐⠠ ▌"], + # 55 + ["¿", "?"], + # 56 + ["⢹", "⢺", "⢼", "⣸", "⣇", "⡧", "⡗", "⡏"], + # 57 + ["⢄", "⢂", "⢁", "⡁", "⡈", "⡐", "⡠"], + # 58 + [". ", ".. ", "...", " ..", " .", " "], + # 59 + [".", "o", "O", "°", "O", "o", "."], + # 60 + ["▓", "▒", "░"], + # 61 + ["▌", "▀", "▐", "▄"], + # 62 + ["⊶", "⊷"], + # 63 + ["▪", "▫"], + # 64 + ["□", "■"], + # 65 + ["▮", "▯"], + # 66 + ["-", "=", "≡"], + # 67 + ["d", "q", "p", "b"], + # 68 + ["∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"], + # 69 + ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "], + # 70 + ["☗", "☖"], + # 71 + ["⧇", "⧆"], + # 72 + ["◉", "◎"], + # 73 + ["㊂", "㊀", "㊁"], + # 74 + ["⦾", "⦿"], + # 75 + ["ဝ", "၀"], + # 76 + ["▌ ", "▀ ", "▐▄"], + # 77 + ["⠈⠁", "⠈⠑", "⠈⠱", "⠈⡱", "⢀⡱", "⢄⡱", "⢄⡱", "⢆⡱", "⢎⡱", "⢎⡰", "⢎⡠", "⢎⡀", "⢎⠁", "⠎⠁", "⠊⠁"], + # 78 + ["________", "-_______", "_-______", "__-_____", "___-____", "____-___", "_____-__", "______-_", "_______-", "________", "_______-", "______-_", "_____-__", "____-___", "___-____", "__-_____", "_-______", "-_______", "________"], + # 79 + ["|_______", "_/______", "__-_____", "___\\____", "____|___", "_____/__", "______-_", "_______\\", "_______|", "______\\_", "_____-__", "____/___", "___|____", "__\\_____", "_-______"], + # 80 + ["□", "◱", "◧", "▣", "■"], + # 81 + ["□", "◱", "▨", "▩", "■"], + # 82 + ["░", "▒", "▓", "█"], + # 83 + ["░", "█"], + # 84 + ["⚪", "⚫"], + # 85 + ["◯", "⬤"], + # 86 + ["▱", "▰"], + # 87 + ["➊", "➋", "➌", "➍", "➎", "➏", "➐", "➑", "➒", "➓"], + # 88 + ["½", "⅓", "⅔", "¼", "¾", "⅛", "⅜", "⅝", "⅞"], + # 89 + ["↞", "↟", "↠", "↡"], + # 90 + ["██▒▒▒▒▒▒▒▒", "▒██▒▒▒▒▒▒▒", "▒▒██▒▒▒▒▒▒", "▒▒▒██▒▒▒▒▒", "▒▒▒▒██▒▒▒▒", "▒▒▒▒▒██▒▒▒", "▒▒▒▒▒▒██▒▒", "▒▒▒▒▒▒▒██▒", "▒▒▒▒▒▒▒▒██", "▒▒▒▒▒▒▒▒▒█", "▒▒▒▒▒▒▒▒▒▒", "█▒▒▒▒▒▒▒▒▒"], + # 91 + ["♈", "♉", "♊", "♋", "♌", "♍", "♎", "♏", "♐", "♑", "♒", "♓"], + # 92 + [" ", "█ ", "██ ", "███ ", " ███ ", " ███ ", " ███ ", " ██", " █", " "], + # 93 + ["🕐", "🕑", "🕒", "🕓", "🕔", "🕕", "🕖", "🕗", "🕘", "🕙", "🕚", "🕛"], + # 94 + ["🕜", "🕝", "🕞", "🕟", "🕠", "🕡", "🕢", "🕣", "🕤", "🕥", "🕦", "🕧"], + # 95 + [" 🚴", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", "🚴 ", " "], + # 96 + ['䷀', '䷁', '䷂', '䷃', '䷄', '䷅', '䷆', '䷇', '䷈', '䷉', '䷊', '䷋', '䷌', '䷍', '䷎', '䷏', '䷐', '䷑', '䷒', '䷓', '䷔', '䷕', '䷖', '䷗', '䷘', '䷙', '䷚', '䷛', '䷜', '䷝', '䷞', '䷟', '䷠', '䷡', '䷢', '䷣', '䷤', '䷥', '䷦', '䷧', '䷨', '䷩', '䷪', '䷫', '䷬', '䷭', '䷮', '䷯', '䷰', '䷱', '䷲', '䷳', '䷴', '䷵', '䷶', '䷷', '䷸', '䷹', '䷺', '䷻', '䷼', '䷽', '䷾', '䷿'], + # 97 + ["▒▒▒▒▒▒▒▒▒▒", "█▒▒▒▒▒▒▒▒▒", "██▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "████▒▒▒▒▒▒", "█████▒▒▒▒▒", "██████▒▒▒▒", "███████▒▒▒", "████████▒▒", "█████████▒", "██████████", "██████████", "▒█████████", "▒▒████████", "▒▒▒███████", "▒▒▒▒██████", "▒▒▒▒▒█████", "▒▒▒▒▒▒████", "▒▒▒▒▒▒▒███", "▒▒▒▒▒▒▒▒██", "▒▒▒▒▒▒▒▒▒█", "▒▒▒▒▒▒▒▒▒▒"], + # 98 + ["▌", "▛", "▜", "▐", "▟", "▙"], + # 99 + ["♫♬♩◖(● o ●)◗♩♬♫", "♩♫♬◖(● o ●)◗♬♫c", "♪♪♫◖(● o ●)◗♫♪♪", "♬♩♪◖(● o ●)◗♪♩♬", "♬♩♪◖(● o ●)◗♪♩♬", "♪♪♫◖(● o ●)◗♫♪♪", "♩♫♬◖(● o ●)◗♬♫♩", "♫♬♩◖(● o ●)◗♩♬♫"], + # 100 + ["``'-.,", "`'-.,_", "'-.,_,", "-.,_,.", ".,_,.-", ",_,.-'", "_,.-'`", ",.-'``", ".-'``'", "-'``'-", "'``'-."], + # 101 + ["``'-.,_,.-'", "`'-.,_,.-'`", "'-.,_,.-'``", "-.,_,.-'``'", ".,_,.-'``'-", ",_,.-'``'-.", "_,.-'``'-.,", ",.-'``'-.,_", ".-'``'-.,_,", "-'``'-.,_,.", "'``'-.,_,.="], + # 102 + ["°", "º", "¤", "ø", ",", "¸", "¸", ",", "ø", "¤", "º", "°", "`"], + # 103 + ["°º¤ø,¸¸", "º¤ø,¸¸,", "¤ø,¸¸,ø", "ø,¸¸,ø¤", ",¸¸,ø¤º", "¸¸,ø¤º°", "¸,ø¤º°`", ",ø¤º°`°", "ø¤º°`°º", "¤º°`°º¤", "º°`°º¤ø", "°`°º¤ø,", "`°º¤ø,¸"], + # 104 + ["°º¤ø,¸¸,ø¤º", "º¤ø,¸¸,ø¤º°", "¤ø,¸¸,ø¤º°`", "ø,¸¸,ø¤º°`°", ",¸¸,ø¤º°`°º", "¸¸,ø¤º°`°º¤", "¸,ø¤º°`°º¤ø", ",ø¤º°`°º¤ø,", "ø¤º°`°º¤ø,¸", "¤º°`°º¤ø,¸¸", "º°`°º¤ø,¸¸,", "°`°º¤ø,¸¸,ø", "`°º¤ø,¸¸,ø¤"], + # 105 + ["(-.-)......", "(-.-)z.....", "(-.-)zz....", "(-.-)Zzz...", "(-.-)ZZzz..", "(-.-)zZZzz.", "(-.-)zzZZzz", "(-.-)zzzZZz", "(-.-)zzzzZZ", "(-.-)zzzzzZ", "(-.-)zzzzzz", "(-.-).zzzzz", "(-.-)..zzzz", "(-.-)...zzz", "(-.-)....zz", "(-.-).....z", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......"], + # 106 + ["(∩^o^)⊃━・☆。*・゚*", "(∩^o^)⊃━。・*☆・*゚", "(∩^o^)⊃━☆*゚。・*・", "(∩^o^)⊃━☆・*゚・*。", "(∩^o^)⊃━。☆**・・゚", "(∩^o^)⊃━*☆゚。*・・", "(∩^o^)⊃━*゚。☆・・*", "(∩^o^)⊃━*・。・☆*゚", "(∩^o^)⊃━・。・☆*゚*", "(∩^o^)⊃━*・・*゚。☆", "(∩^o^)⊃━。*☆゚*・・", "(∩^o^)⊃━*゚・・。*☆"], + # 107 + ["(ノ>ω<)ノ・:’’,・・", "(ノ>ω<)ノ・゚:,★゚*", "(ノ>ω<)ノ★:・:゚:,", "(ノ>ω<)ノ*:。’゚・・", "(ノ>ω<)ノ゚。’:*:・", "(ノ>ω<)ノ・:。 ゚:・", "(ノ>ω<)ノ★::・・’’", "(ノ>ω<)ノ:☆゚・*,:", "(ノ>ω<)ノ★’: 。’:", "(ノ>ω<)ノ :*・:*’", "(ノ>ω<)ノ。:::*・゚", "(ノ>ω<)ノ・:::゚’★", "(ノ>ω<)ノ★,:。:。・", "(ノ>ω<)ノ: ,**・:", "(ノ>ω<)ノ・’’:゚::", "(ノ>ω<)ノ**。 ’::", "(ノ>ω<)ノ’:★・☆,*", "(ノ>ω<)ノ。 :,’*★", "(ノ>ω<)ノ:★:☆・・*", "(ノ>ω<)ノ・:゚’* ・"], + # 108 + ["(ノ◕ヮ◕)ノ゚*:・゚✧", "(ノ◕ヮ◕)ノ***:・゚", "(ノ◕ヮ◕)ノ✧:**:・", "(ノ◕ヮ◕)ノ✧✧:**:", "(ノ◕ヮ◕)ノ・゚✧:**", "(ノ◕ヮ◕)ノ・・゚✧:*", "(ノ◕ヮ◕)ノ✧✧・゚✧:", "(ノ◕ヮ◕)ノ゚゚✧・゚✧", "(ノ◕ヮ◕)ノ**゚✧・゚", "(ノ◕ヮ◕)ノ*:*゚✧・", "(ノ◕ヮ◕)ノ*・:*゚✧", "(ノ◕ヮ◕)ノ*:・:*゚", "(ノ◕ヮ◕)ノ*゚:・:*", "(ノ◕ヮ◕)ノ・・゚:・:", "(ノ◕ヮ◕)ノ:*・゚:・", "(ノ◕ヮ◕)ノ゚✧*・゚:", "(ノ◕ヮ◕)ノ・✧✧*・゚", "(ノ◕ヮ◕)ノ:・✧✧*・", "(ノ◕ヮ◕)ノ:゚・✧✧*", "(ノ◕ヮ◕)ノ✧*゚・✧✧"], + # 109 + ["( ˘ ɜ˘) ♬♪♫", "( ˘ ɜ˘) ♫♬♪", "( ˘ ɜ˘) ♪♫♬", "( ˘ ɜ˘) ♬♪♫", "( ˘ ɜ˘) ♫♬♪", "( ˘ ˘) ♫♬", "( ˘ ˘) ♫", "( ˘ ˘) ", "( ˘ ˘) ", "( ˘ ɜ˘) ", "( ˘ ɜ˘) ♬ ", "( ˘ ɜ˘) ♪♬ "], + # 110 + ["`、ヽ`ヽ`、ヽ", "ヽ`、ヽ`ヽ`、", "、ヽ`、ヽ`ヽ`", "`、ヽ`、ヽ`ヽ", "ヽ`、ヽ`、ヽ`", "`ヽ`、ヽ`、ヽ", "ヽ`ヽ`、ヽ`、"], +] \ No newline at end of file From 5ff2424d05b7f2f946977cf7a1e8c01283e1f209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Wed, 8 Nov 2023 00:23:59 -0500 Subject: [PATCH 04/12] delay adjustment + comments --- src/pullrequestion_draft.md | 16 ++++++++++++++++ src/spinners.jl | 19 ++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 src/pullrequestion_draft.md diff --git a/src/pullrequestion_draft.md b/src/pullrequestion_draft.md new file mode 100644 index 0000000..d7d0897 --- /dev/null +++ b/src/pullrequestion_draft.md @@ -0,0 +1,16 @@ +I like spinners with my `ProgressUnknown()`, so here's collection of 110 of them. The first 89 are stolen (with credits) from https://github.com/briandowns/spinner, the rest (90-110) I had fun creating this evening. + +Summary of the changes: +- Includes a `spinnercollection` of 110 spinners, +- Added the possibility of specifying spinners that are `AbstractVector{<:AbstractString}`. Were there any reason to restrict them to a single `Char`? +- `next!(prog, spinner=idx)` is equivalent to `next!(prog, spinner=spinnercollection[idx])` +- There a fun `demospinners()` function that shows them all in action, but also + - `demospinners(idx)` to look at a specific spinner in the collection, + - `demospinners(string)`, `demospinners(vector_of_chars)`, and `demospinners(vector_of_strings) to look at your own spinners, + - `demospinners(vector_of_vectors_of_strings)` will show all your spinners in a nicely aligned table. `demospinners()` is just `demospinners(spinnercollection)`. + +Demo (the gif doesn't loop perfectly like the spinners for obvious reasons): +![spinners](https://github.com/timholy/ProgressMeter.jl/assets/7315599/64015cad-247c-45dd-9a0f-1ffbca1cbab8) + +and so you can get things like this +![progressunknown](https://github.com/timholy/ProgressMeter.jl/assets/7315599/eddbe03f-0b48-4ed7-a2e7-8074ae37d33a) diff --git a/src/spinners.jl b/src/spinners.jl index d1d1206..b47148b 100644 --- a/src/spinners.jl +++ b/src/spinners.jl @@ -19,24 +19,29 @@ limitations under the License. using IterTools: zip_longest using Base.Iterators: partition -function demospinners(spinnerset::AbstractVector{<:AbstractString}; delay=0.11) +function demospinners(spinnerset::AbstractVector{<:AbstractString}; delay=0.12) demospinners([spinnerset], delay=delay) end -function demospinners(spinnerset::Union{AbstractString, AbstractVector{<:AbstractChar}}; delay=0.11) +function demospinners(spinnerset::Union{AbstractString, AbstractVector{<:AbstractChar}}; delay=0.12) demospinners([collect(spinnerset)], delay=delay) end -function demospinners(spinneridx::Int; delay=0.11) +function demospinners(spinneridx::Int; delay=0.12) demospinners([spinnercollection[spinneridx]], delay=delay) end -function demospinners(spinnerset=spinnercollection; delay=0.11) +function demospinners(spinnerset=spinnercollection; delay=0.12) + + + # Let's find the widest aligned grid that accommodates + # all spinners given the dimensions of stdout + # (surely there's a better way to do it) th, tw = displaysize(stdout) + lenmaxidx = textwidth("$(lastindex(spinnerset))") - lenmaxidx = length("$(lastindex(spinnerset))") - # length("[idx] spinnerstring ") - # ^ ^^ ^ = +4 + # textwidth("[idx] spinnerstring ") + # ^ ^^ ^ = +4 fixedlengths = textwidth.(first.(spinnerset)) .+ 4 .+ lenmaxidx w = 1 for _ in 1:length(fixedlengths) From ffdcec2396457f6ab5ca3ebce1132dcddc5abe96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Wed, 8 Nov 2023 13:31:14 -0500 Subject: [PATCH 05/12] oups --- src/pullrequestion_draft.md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 src/pullrequestion_draft.md diff --git a/src/pullrequestion_draft.md b/src/pullrequestion_draft.md deleted file mode 100644 index d7d0897..0000000 --- a/src/pullrequestion_draft.md +++ /dev/null @@ -1,16 +0,0 @@ -I like spinners with my `ProgressUnknown()`, so here's collection of 110 of them. The first 89 are stolen (with credits) from https://github.com/briandowns/spinner, the rest (90-110) I had fun creating this evening. - -Summary of the changes: -- Includes a `spinnercollection` of 110 spinners, -- Added the possibility of specifying spinners that are `AbstractVector{<:AbstractString}`. Were there any reason to restrict them to a single `Char`? -- `next!(prog, spinner=idx)` is equivalent to `next!(prog, spinner=spinnercollection[idx])` -- There a fun `demospinners()` function that shows them all in action, but also - - `demospinners(idx)` to look at a specific spinner in the collection, - - `demospinners(string)`, `demospinners(vector_of_chars)`, and `demospinners(vector_of_strings) to look at your own spinners, - - `demospinners(vector_of_vectors_of_strings)` will show all your spinners in a nicely aligned table. `demospinners()` is just `demospinners(spinnercollection)`. - -Demo (the gif doesn't loop perfectly like the spinners for obvious reasons): -![spinners](https://github.com/timholy/ProgressMeter.jl/assets/7315599/64015cad-247c-45dd-9a0f-1ffbca1cbab8) - -and so you can get things like this -![progressunknown](https://github.com/timholy/ProgressMeter.jl/assets/7315599/eddbe03f-0b48-4ed7-a2e7-8074ae37d33a) From b9ea0cd9ddf67b45f4bdc2b6fb1e4176238f751c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Wed, 8 Nov 2023 13:50:30 -0500 Subject: [PATCH 06/12] green spinner in demo, make spinnercollection a const --- src/spinners.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spinners.jl b/src/spinners.jl index b47148b..c9bacd0 100644 --- a/src/spinners.jl +++ b/src/spinners.jl @@ -63,7 +63,7 @@ function demospinners(spinnerset=spinnercollection; delay=0.12) for (i, (spinner_row, idx_row)) in enumerate(zip(spinnergrid, idxgrid)) for (j, (spinner_charset, idx, colwidth)) in enumerate(zip(spinner_row, idx_row, colwidths)) - msg = @sprintf "\u1b[34m[%s]\u1b[39m %s " lpad("$idx", lenmaxidx) spinner_charset[spincountergrid[i][j]+1] + msg = @sprintf "\u1b[34m[%s]\u1b[32m %s " lpad("$idx", lenmaxidx) spinner_charset[spincountergrid[i][j]+1] # ^^^^ ^^^^ = +8 msg = rpad(msg, colwidth + 8) # +8 accounts for ANSI escape sequences. # textwidth used by lpad/rpad does not count \u1b @@ -77,7 +77,7 @@ function demospinners(spinnerset=spinnercollection; delay=0.12) end end -spinnercollection = [ +const spinnercollection::Vector{Vector{String}} = [ # 1 ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"], # 2 @@ -269,7 +269,7 @@ spinnercollection = [ # 95 [" 🚴", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", "🚴 ", " "], # 96 - ['䷀', '䷁', '䷂', '䷃', '䷄', '䷅', '䷆', '䷇', '䷈', '䷉', '䷊', '䷋', '䷌', '䷍', '䷎', '䷏', '䷐', '䷑', '䷒', '䷓', '䷔', '䷕', '䷖', '䷗', '䷘', '䷙', '䷚', '䷛', '䷜', '䷝', '䷞', '䷟', '䷠', '䷡', '䷢', '䷣', '䷤', '䷥', '䷦', '䷧', '䷨', '䷩', '䷪', '䷫', '䷬', '䷭', '䷮', '䷯', '䷰', '䷱', '䷲', '䷳', '䷴', '䷵', '䷶', '䷷', '䷸', '䷹', '䷺', '䷻', '䷼', '䷽', '䷾', '䷿'], + ["䷀", "䷁", "䷂", "䷃", "䷄", "䷅", "䷆", "䷇", "䷈", "䷉", "䷊", "䷋", "䷌", "䷍", "䷎", "䷏", "䷐", "䷑", "䷒", "䷓", "䷔", "䷕", "䷖", "䷗", "䷘", "䷙", "䷚", "䷛", "䷜", "䷝", "䷞", "䷟", "䷠", "䷡", "䷢", "䷣", "䷤", "䷥", "䷦", "䷧", "䷨", "䷩", "䷪", "䷫", "䷬", "䷭", "䷮", "䷯", "䷰", "䷱", "䷲", "䷳", "䷴", "䷵", "䷶", "䷷", "䷸", "䷹", "䷺", "䷻", "䷼", "䷽", "䷾", "䷿"], # 97 ["▒▒▒▒▒▒▒▒▒▒", "█▒▒▒▒▒▒▒▒▒", "██▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "████▒▒▒▒▒▒", "█████▒▒▒▒▒", "██████▒▒▒▒", "███████▒▒▒", "████████▒▒", "█████████▒", "██████████", "██████████", "▒█████████", "▒▒████████", "▒▒▒███████", "▒▒▒▒██████", "▒▒▒▒▒█████", "▒▒▒▒▒▒████", "▒▒▒▒▒▒▒███", "▒▒▒▒▒▒▒▒██", "▒▒▒▒▒▒▒▒▒█", "▒▒▒▒▒▒▒▒▒▒"], # 98 From fa0746ae20b35bece7b9bb286ba8f86522f1e926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Wed, 8 Nov 2023 14:04:07 -0500 Subject: [PATCH 07/12] simpler dispatch --- src/spinners.jl | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/spinners.jl b/src/spinners.jl index c9bacd0..cf2ae0f 100644 --- a/src/spinners.jl +++ b/src/spinners.jl @@ -19,21 +19,7 @@ limitations under the License. using IterTools: zip_longest using Base.Iterators: partition -function demospinners(spinnerset::AbstractVector{<:AbstractString}; delay=0.12) - demospinners([spinnerset], delay=delay) -end - -function demospinners(spinnerset::Union{AbstractString, AbstractVector{<:AbstractChar}}; delay=0.12) - demospinners([collect(spinnerset)], delay=delay) -end - -function demospinners(spinneridx::Int; delay=0.12) - demospinners([spinnercollection[spinneridx]], delay=delay) -end - function demospinners(spinnerset=spinnercollection; delay=0.12) - - # Let's find the widest aligned grid that accommodates # all spinners given the dimensions of stdout # (surely there's a better way to do it) @@ -45,16 +31,16 @@ function demospinners(spinnerset=spinnercollection; delay=0.12) fixedlengths = textwidth.(first.(spinnerset)) .+ 4 .+ lenmaxidx w = 1 for _ in 1:length(fixedlengths) - irreg_grid = collect.(partition(fixedlengths, w)) - colwidths = maximum.(zip_longest(irreg_grid...; default=0)) + irreggrid = collect.(partition(fixedlengths, w)) + colwidths = maximum.(zip_longest(irreggrid...; default=0)) if sum(colwidths) > tw w -= 1 break end w += 1 end - irreg_grid = collect.(partition(fixedlengths, w)) - colwidths = maximum.(zip_longest(irreg_grid...; default=0)) + irreggrid = collect.(partition(fixedlengths, w)) + colwidths = maximum.(zip_longest(irreggrid...; default=0)) spinnergrid = partition(spinnerset, w) idxgrid = partition(1:length(spinnerset), w) spincountergrid = collect.(partition(fill(0, length(spinnerset)), w)) @@ -77,6 +63,11 @@ function demospinners(spinnerset=spinnercollection; delay=0.12) end end +demospinners(spinneridx::Int; delay=0.12) = demospinners([spinnercollection[spinneridx]], delay=delay) +demospinners(spinnerstring::AbstractString; delay=0.12) = demospinners([collect(spinnerstring)], delay=delay) +demospinners(spinnerset::Union{AbstractVector{<:AbstractString}, AbstractVector{<:AbstractChar}}; delay=0.12) = demospinners([spinnerset], delay=delay) + + const spinnercollection::Vector{Vector{String}} = [ # 1 ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"], From af4ce43d4a740a6237d67db8d9ba4c843995be3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Thu, 23 Nov 2023 14:08:11 -0500 Subject: [PATCH 08/12] cleaner find_gridwidths, only print what can be fitted in terminal --- src/spinners.jl | 74 ++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/src/spinners.jl b/src/spinners.jl index cf2ae0f..07d0998 100644 --- a/src/spinners.jl +++ b/src/spinners.jl @@ -20,47 +20,65 @@ using IterTools: zip_longest using Base.Iterators: partition function demospinners(spinnerset=spinnercollection; delay=0.12) - # Let's find the widest aligned grid that accommodates - # all spinners given the dimensions of stdout - # (surely there's a better way to do it) - th, tw = displaysize(stdout) + # We'll display an index [k] next to each spinner. + # If there are 9 or less spinners, then those will + # be 3 char wide ([1]...[9]). If there are between 10 + # and 99, then they'll be 4 char wide ([10]..[99]), etc. lenmaxidx = textwidth("$(lastindex(spinnerset))") - # textwidth("[idx] spinnerstring ") - # ^ ^^ ^ = +4 - fixedlengths = textwidth.(first.(spinnerset)) .+ 4 .+ lenmaxidx - w = 1 - for _ in 1:length(fixedlengths) - irreggrid = collect.(partition(fixedlengths, w)) - colwidths = maximum.(zip_longest(irreggrid...; default=0)) - if sum(colwidths) > tw - w -= 1 - break + # We assume each spinner string for a given spinner is the same length + # [ N] spinnerN [N+1] spinnerN+1 + # ^ ^^ ^ = +4 + fixedlens = textwidth.(first.(spinnerset)) .+ 4 .+ lenmaxidx + + function find_colwidths(lens, total_width) + N = length(lens) + colwidths = Int[] + for nbcols in length(spinnerset):-1:1 + nbrows = div(N + nbcols - 1, nbcols) + padlen = nbrows * nbcols - N + paddedlens = vcat(lens, zeros(Int, padlen)) + griddedlens = transpose(reshape(paddedlens, nbcols, :)) + colwidths = maximum(griddedlens, dims=1)[1, :] + if sum(colwidths) < total_width + return colwidths, nbcols, nbrows + end end - w += 1 end - irreggrid = collect.(partition(fixedlengths, w)) - colwidths = maximum.(zip_longest(irreggrid...; default=0)) - spinnergrid = partition(spinnerset, w) - idxgrid = partition(1:length(spinnerset), w) - spincountergrid = collect.(partition(fill(0, length(spinnerset)), w)) + termheight, current_tw = displaysize(stdout) + colwidths, nbcols, nbrows = find_colwidths(fixedlens, current_tw) + spinnercounters = zeros(Int, length(spinnerset)) + print("\033[2J\033[H") while true - for (i, (spinner_row, idx_row)) in enumerate(zip(spinnergrid, idxgrid)) - for (j, (spinner_charset, idx, colwidth)) in enumerate(zip(spinner_row, idx_row, colwidths)) - - msg = @sprintf "\u1b[34m[%s]\u1b[32m %s " lpad("$idx", lenmaxidx) spinner_charset[spincountergrid[i][j]+1] + termheight, tw = displaysize(stdout) + if tw != current_tw + current_tw = tw + colwidths, nbcols, nbrows = find_colwidths(fixedlens, current_tw) + print("\033[2J\033[H") + end + + for k in 1:length(spinnerset) + colidx = mod(k - 1, nbcols) + 1 + rowidx = div(k + nbcols - 1, nbcols) + colwidth = colwidths[colidx] + + if (termheight - nbrows + rowidx) > 0 + msg = @sprintf "\u1b[34m[%s]\u1b[32m %s " lpad("$k", lenmaxidx) spinnerset[k][spinnercounters[k]+1] # ^^^^ ^^^^ = +8 msg = rpad(msg, colwidth + 8) # +8 accounts for ANSI escape sequences. - # textwidth used by lpad/rpad does not count \u1b + # textwidth used by lpad/rpad does not count \u1b print(msg) - spincountergrid[i][j] = (spincountergrid[i][j] + 1) % length(spinner_charset) + if colidx == nbcols && rowidx != nbrows + println() + end end - print("\n") + spinnercounters[k] = (spinnercounters[k] + 1) % length(spinnerset[k]) end - print("\r\u1b[A"^length(spinnergrid)) + print("\r\u1b[A"^min(nbrows, termheight)) sleep(delay) end + end demospinners(spinneridx::Int; delay=0.12) = demospinners([spinnercollection[spinneridx]], delay=delay) From dee19d4f0eb71aea389e310522fc80b10056501c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Thu, 23 Nov 2023 14:18:39 -0500 Subject: [PATCH 09/12] display head rather than tail when terminal too small --- src/spinners.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spinners.jl b/src/spinners.jl index 07d0998..74cf8b5 100644 --- a/src/spinners.jl +++ b/src/spinners.jl @@ -40,7 +40,7 @@ function demospinners(spinnerset=spinnercollection; delay=0.12) paddedlens = vcat(lens, zeros(Int, padlen)) griddedlens = transpose(reshape(paddedlens, nbcols, :)) colwidths = maximum(griddedlens, dims=1)[1, :] - if sum(colwidths) < total_width + if sum(colwidths) <= total_width return colwidths, nbcols, nbrows end end @@ -63,13 +63,13 @@ function demospinners(spinnerset=spinnercollection; delay=0.12) rowidx = div(k + nbcols - 1, nbcols) colwidth = colwidths[colidx] - if (termheight - nbrows + rowidx) > 0 + if rowidx <= termheight msg = @sprintf "\u1b[34m[%s]\u1b[32m %s " lpad("$k", lenmaxidx) spinnerset[k][spinnercounters[k]+1] # ^^^^ ^^^^ = +8 msg = rpad(msg, colwidth + 8) # +8 accounts for ANSI escape sequences. # textwidth used by lpad/rpad does not count \u1b print(msg) - if colidx == nbcols && rowidx != nbrows + if colidx == nbcols && rowidx != termheight println() end end From 596e8557713dc098183b18e7a606be2f07d73fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Thu, 23 Nov 2023 14:21:12 -0500 Subject: [PATCH 10/12] no need for itertools and partition anymore --- src/spinners.jl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/spinners.jl b/src/spinners.jl index 74cf8b5..c9b0d93 100644 --- a/src/spinners.jl +++ b/src/spinners.jl @@ -16,9 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. """ -using IterTools: zip_longest -using Base.Iterators: partition - function demospinners(spinnerset=spinnercollection; delay=0.12) # We'll display an index [k] next to each spinner. # If there are 9 or less spinners, then those will @@ -69,7 +66,7 @@ function demospinners(spinnerset=spinnercollection; delay=0.12) msg = rpad(msg, colwidth + 8) # +8 accounts for ANSI escape sequences. # textwidth used by lpad/rpad does not count \u1b print(msg) - if colidx == nbcols && rowidx != termheight + if colidx == nbcols && rowidx < termheight println() end end From 1070324db5955360f1a77336ba5c303e849b50ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Thu, 23 Nov 2023 17:06:45 -0500 Subject: [PATCH 11/12] reorganized/new spinners, docstrings, allow varlen spinner strings --- src/ProgressMeter.jl | 2 +- src/spinners.jl | 258 +++++++++++++++---------------------------- 2 files changed, 93 insertions(+), 167 deletions(-) diff --git a/src/ProgressMeter.jl b/src/ProgressMeter.jl index a921325..11df525 100644 --- a/src/ProgressMeter.jl +++ b/src/ProgressMeter.jl @@ -391,7 +391,7 @@ end export spinnercollection, demospinners include("spinners.jl") -const default_spinner_chars = spinnercollection[8] +const default_spinner_chars = spinnercollection[1] const default_spinner_done = '✓' spinner_char(p::ProgressUnknown, spinner::AbstractChar) = spinner diff --git a/src/spinners.jl b/src/spinners.jl index c9b0d93..52de2fc 100644 --- a/src/spinners.jl +++ b/src/spinners.jl @@ -1,5 +1,5 @@ """ -Spinners 1-89 yoinked from https://github.com/briandowns/spinner +89 out of the following spinners were taken from https://github.com/briandowns/spinner Copyright (c) 2022 Brian J. Downs @@ -16,22 +16,29 @@ See the License for the specific language governing permissions and limitations under the License. """ -function demospinners(spinnerset=spinnercollection; delay=0.12) +""" + demospinners(spinners; delay=0.12) + +Demo a collection of spinners, each assumed to be given by either a Vector{Char} or a Vector{String}. +""" +function demospinners(spinners; delay=0.12) + # We'll display an index [k] next to each spinner. # If there are 9 or less spinners, then those will # be 3 char wide ([1]...[9]). If there are between 10 # and 99, then they'll be 4 char wide ([10]..[99]), etc. - lenmaxidx = textwidth("$(lastindex(spinnerset))") + lenmaxidx = textwidth("$(lastindex(spinners))") - # We assume each spinner string for a given spinner is the same length + # Strings of a spinner given by a Vector{String} don't + # have to be of the same length. + fixedlens = textwidth.(argmax.(length, spinners)) .+ lenmaxidx .+ 4 # [ N] spinnerN [N+1] spinnerN+1 # ^ ^^ ^ = +4 - fixedlens = textwidth.(first.(spinnerset)) .+ 4 .+ lenmaxidx function find_colwidths(lens, total_width) N = length(lens) colwidths = Int[] - for nbcols in length(spinnerset):-1:1 + for nbcols in length(spinners):-1:1 nbrows = div(N + nbcols - 1, nbcols) padlen = nbrows * nbcols - N paddedlens = vcat(lens, zeros(Int, padlen)) @@ -45,23 +52,26 @@ function demospinners(spinnerset=spinnercollection; delay=0.12) termheight, current_tw = displaysize(stdout) colwidths, nbcols, nbrows = find_colwidths(fixedlens, current_tw) - spinnercounters = zeros(Int, length(spinnerset)) + spinnercounters = zeros(Int, length(spinners)) + + # clear terminal print("\033[2J\033[H") while true termheight, tw = displaysize(stdout) + # detect change in terminal dimensions if tw != current_tw current_tw = tw colwidths, nbcols, nbrows = find_colwidths(fixedlens, current_tw) print("\033[2J\033[H") end - for k in 1:length(spinnerset) + for k in 1:length(spinners) colidx = mod(k - 1, nbcols) + 1 rowidx = div(k + nbcols - 1, nbcols) colwidth = colwidths[colidx] if rowidx <= termheight - msg = @sprintf "\u1b[34m[%s]\u1b[32m %s " lpad("$k", lenmaxidx) spinnerset[k][spinnercounters[k]+1] + msg = @sprintf "\u1b[34m[%s]\u1b[32m %s " lpad("$k", lenmaxidx) spinners[k][spinnercounters[k]+1] # ^^^^ ^^^^ = +8 msg = rpad(msg, colwidth + 8) # +8 accounts for ANSI escape sequences. # textwidth used by lpad/rpad does not count \u1b @@ -70,7 +80,7 @@ function demospinners(spinnerset=spinnercollection; delay=0.12) println() end end - spinnercounters[k] = (spinnercounters[k] + 1) % length(spinnerset[k]) + spinnercounters[k] = (spinnercounters[k] + 1) % length(spinners[k]) end print("\r\u1b[A"^min(nbrows, termheight)) sleep(delay) @@ -78,230 +88,146 @@ function demospinners(spinnerset=spinnercollection; delay=0.12) end -demospinners(spinneridx::Int; delay=0.12) = demospinners([spinnercollection[spinneridx]], delay=delay) -demospinners(spinnerstring::AbstractString; delay=0.12) = demospinners([collect(spinnerstring)], delay=delay) -demospinners(spinnerset::Union{AbstractVector{<:AbstractString}, AbstractVector{<:AbstractChar}}; delay=0.12) = demospinners([spinnerset], delay=delay) +""" + demospinners(; delay=0.12) + +Demo the default collection of spinners with their index which can be selected using `next!(..., spinner=index)` +""" +demospinners(; delay=0.12) = demospinners(spinnercollection, delay=delay) + +""" + demospinners(k::Int; delay=0.12) + +Demo the `k`th spinner in the default spinner collection. +""" +demospinners(k::Int; delay=0.12) = demospinners([spinnercollection[k]], delay=delay) + +""" + demospinners(spinner::AbstractString; delay=0.12) + +Demo a custom `spinner` given by the characters of a string. +""" +demospinners(spinner::AbstractString; delay=0.12) = demospinners([collect(spinner)], delay=delay) +""" + demospinners(spinner::Union{AbstractVector{<:AbstractString}, AbstractVector{<:AbstractChar}}; delay=0.12) + +Demo a custom `spinner` given by a vector of characters or strings. +""" +demospinners(spinner::Union{AbstractVector{<:AbstractString}, AbstractVector{<:AbstractChar}}; delay=0.12) = demospinners([spinner], delay=delay) const spinnercollection::Vector{Vector{String}} = [ - # 1 + ["◐", "◓", "◑", "◒"], ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"], - # 2 ["▁", "▃", "▄", "▅", "▆", "▇", "█", "▇", "▆", "▅", "▄", "▃", "▁"], - # 3 ["▖", "▘", "▝", "▗"], - # 4 ["┤", "┘", "┴", "└", "├", "┌", "┬", "┐"], - # 5 ["◢", "◣", "◤", "◥"], - # 6 ["◰", "◳", "◲", "◱"], - # 7 ["◴", "◷", "◶", "◵"], - # 8 - ["◐", "◓", "◑", "◒"], - # 9 [".", "o", "O", "@", "*"], - # 10 ["|", "/", "-", "\\"], - # 11 - ["◡◡", "⊙⊙", "◠◠"], - # 12 + ["◜", "◝", "◞", "◟"], + ["⬒", "⬔", "⬓", "⬕"], + ["⬖", "⬘", "⬗", "⬙"], ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"], - # 13 - [">))'> ", " >))'> ", " >))'> ", " >))'> ", " >))'>", " <'((< ", " <'((< ", " <'((< "], - # 14 ["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"], - # 15 ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"], - # 16 ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], - # 17 ["▉", "▊", "▋", "▌", "▍", "▎", "▏", "▎", "▍", "▌", "▋", "▊", "▉"], - # 18 ["■", "□", "▪", "▫"], - # 19 ["←", "↑", "→", "↓"], - # 20 ["╫", "╪"], - # 21 + ["♠", "♣", "♥", "♦"], + ["➞", "➟", "➠", "➡", "➠", "➟"], ["⇐", "⇖", "⇑", "⇗", "⇒", "⇘", "⇓", "⇙"], - # 22 ["⠁", "⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈", "⠈"], - # 23 ["⠈", "⠉", "⠋", "⠓", "⠒", "⠐", "⠐", "⠒", "⠖", "⠦", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈"], - # 24 ["⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠴", "⠲", "⠒", "⠂", "⠂", "⠒", "⠚", "⠙", "⠉", "⠁"], - # 25 ["⠋", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋"], - # 26 ["ヲ", "ァ", "ィ", "ゥ", "ェ", "ォ", "ャ", "ュ", "ョ", "ッ", "ア", "イ", "ウ", "エ", "オ", "カ", "キ", "ク", "ケ", "コ", "サ", "シ", "ス", "セ", "ソ", "タ", "チ", "ツ", "テ", "ト", "ナ", "ニ", "ヌ", "ネ", "ノ", "ハ", "ヒ", "フ", "ヘ", "ホ", "マ", "ミ", "ム", "メ", "モ", "ヤ", "ユ", "ヨ", "ラ", "リ", "ル", "レ", "ロ", "ワ", "ン"], - # 27 - [". ", ".. ", "..."], - # 28 ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█", "▉", "▊", "▋", "▌", "▍", "▎", "▏", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█", "▇", "▆", "▅", "▄", "▃", "▂", "▁"], - # 29 [".", "o", "O", "°", "O", "o", "."], - # 30 ["+", "x"], - # 31 ["v", "<", "^", ">"], - # 32 - [">>---> ", " >>---> ", " >>---> ", " >>---> ", " >>--->", " <---<<", " <---<< ", " <---<< ", " <---<< ", "<---<< "], - # 33 original didn't have fixed width - ["| ", "|| ", "||| ", "|||| ", "||||| ", "|||||| ", "||||||| ", "||||||||", "||||||| ", "|||||| ", "||||| ", "|||| ", "||| ", "|| ", "| "], - # 34 - ["[ ]", "[= ]", "[== ]", "[=== ]", "[==== ]", "[===== ]", "[====== ]", "[======= ]", "[======== ]", "[========= ]", "[==========]"], - # 35 - ["(*---------)", "(-*--------)", "(--*-------)", "(---*------)", "(----*-----)", "(-----*----)", "(------*---)", "(-------*--)", "(--------*-)", "(---------*)"], - # 36 - ["█▒▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "█████▒▒▒▒▒", "███████▒▒▒", "██████████"], - # 37 - ["[ ]", "[> ]", "[=> ]", "[===> ]", "[=====> ]", "[======> ]", "[========> ]", "[=========>]", "[ =========]", "[ ========]", "[ =======]", "[ ======]", "[ =====]", "[ ====]", "[ ===]", "[ ==]", "[ =]"], - # 38 - ["🌍", "🌎", "🌏"], - # 39 - ["◜", "◝", "◞", "◟"], - # 40 - ["⬒", "⬔", "⬓", "⬕"], - # 41 - ["⬖", "⬘", "⬗", "⬙"], - # 42 - ["[>>> >]", "[]>>>> []", "[] >>>> []", "[] >>>> []", "[] >>>> []", "[] >>>>[]", "[>> >>]"], - # 43 - ["♠", "♣", "♥", "♦"], - # 44 - ["➞", "➟", "➠", "➡", "➠", "➟"], - # 45 - [" | ", " \\ ", "_ ", " \\ ", " | ", " / ", " _", " / "], - # 46 - [" . . . .", ". . . .", ". . . .", ". . . .", ". . . . ", ". . . . ."], - # 47 - [" | ", " / ", " _ ", " \\ ", " | ", " \\ ", " _ ", " / "], - # 48 ["⎺", "⎻", "⎼", "⎽", "⎼", "⎻"], - # 49 - ["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"], - # 50 - ["[ ]", "[ =]", "[ ==]", "[ ===]", "[====]", "[=== ]", "[== ]", "[= ]"], - # 51 - ["( ● )", "( ● )", "( ● )", "( ● )", "( ●)", "( ● )", "( ● )", "( ● )", "( ● )"], - # 52 ["✶", "✸", "✹", "✺", "✹", "✷"], - # 53 - ["▐|\\____________▌", "▐_|\\___________▌", "▐__|\\__________▌", "▐___|\\_________▌", "▐____|\\________▌", "▐_____|\\_______▌", "▐______|\\______▌", "▐_______|\\_____▌", "▐________|\\____▌", "▐_________|\\___▌", "▐__________|\\__▌", "▐___________|\\_▌", "▐____________|\\▌", "▐____________/|▌", "▐___________/|_▌", "▐__________/|__▌", "▐_________/|___▌", "▐________/|____▌", "▐_______/|_____▌", "▐______/|______▌", "▐_____/|_______▌", "▐____/|________▌", "▐___/|_________▌", "▐__/|__________▌", "▐_/|___________▌", "▐/|____________▌"], - # 54 - ["▐⠂ ▌", "▐⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂▌", "▐ ⠠▌", "▐ ⡀▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐⠠ ▌"], - # 55 ["¿", "?"], - # 56 - ["⢹", "⢺", "⢼", "⣸", "⣇", "⡧", "⡗", "⡏"], - # 57 - ["⢄", "⢂", "⢁", "⡁", "⡈", "⡐", "⡠"], - # 58 - [". ", ".. ", "...", " ..", " .", " "], - # 59 [".", "o", "O", "°", "O", "o", "."], - # 60 ["▓", "▒", "░"], - # 61 ["▌", "▀", "▐", "▄"], - # 62 ["⊶", "⊷"], - # 63 ["▪", "▫"], - # 64 ["□", "■"], - # 65 ["▮", "▯"], - # 66 ["-", "=", "≡"], - # 67 ["d", "q", "p", "b"], - # 68 - ["∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"], - # 69 - ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "], - # 70 + ["⢹", "⢺", "⢼", "⣸", "⣇", "⡧", "⡗", "⡏"], ["☗", "☖"], - # 71 ["⧇", "⧆"], - # 72 ["◉", "◎"], - # 73 ["㊂", "㊀", "㊁"], - # 74 ["⦾", "⦿"], - # 75 ["ဝ", "၀"], - # 76 ["▌ ", "▀ ", "▐▄"], - # 77 ["⠈⠁", "⠈⠑", "⠈⠱", "⠈⡱", "⢀⡱", "⢄⡱", "⢄⡱", "⢆⡱", "⢎⡱", "⢎⡰", "⢎⡠", "⢎⡀", "⢎⠁", "⠎⠁", "⠊⠁"], - # 78 - ["________", "-_______", "_-______", "__-_____", "___-____", "____-___", "_____-__", "______-_", "_______-", "________", "_______-", "______-_", "_____-__", "____-___", "___-____", "__-_____", "_-______", "-_______", "________"], - # 79 - ["|_______", "_/______", "__-_____", "___\\____", "____|___", "_____/__", "______-_", "_______\\", "_______|", "______\\_", "_____-__", "____/___", "___|____", "__\\_____", "_-______"], - # 80 + ["⢄", "⢂", "⢁", "⡁", "⡈", "⡐", "⡠"], ["□", "◱", "◧", "▣", "■"], - # 81 ["□", "◱", "▨", "▩", "■"], - # 82 ["░", "▒", "▓", "█"], - # 83 ["░", "█"], - # 84 - ["⚪", "⚫"], - # 85 ["◯", "⬤"], - # 86 ["▱", "▰"], - # 87 ["➊", "➋", "➌", "➍", "➎", "➏", "➐", "➑", "➒", "➓"], - # 88 + ["⚀", "⚂", "⚄", "⚄", "⚀", "⚀", "⚀", "⚄", "⚅", "⚀", "⚃", "⚀", "⚄", "⚀", "⚄", "⚅", "⚅", "⚀", "⚅", "⚅"], ["½", "⅓", "⅔", "¼", "¾", "⅛", "⅜", "⅝", "⅞"], - # 89 ["↞", "↟", "↠", "↡"], - # 90 - ["██▒▒▒▒▒▒▒▒", "▒██▒▒▒▒▒▒▒", "▒▒██▒▒▒▒▒▒", "▒▒▒██▒▒▒▒▒", "▒▒▒▒██▒▒▒▒", "▒▒▒▒▒██▒▒▒", "▒▒▒▒▒▒██▒▒", "▒▒▒▒▒▒▒██▒", "▒▒▒▒▒▒▒▒██", "▒▒▒▒▒▒▒▒▒█", "▒▒▒▒▒▒▒▒▒▒", "█▒▒▒▒▒▒▒▒▒"], - # 91 ["♈", "♉", "♊", "♋", "♌", "♍", "♎", "♏", "♐", "♑", "♒", "♓"], - # 92 - [" ", "█ ", "██ ", "███ ", " ███ ", " ███ ", " ███ ", " ██", " █", " "], - # 93 + ["䷀", "䷁", "䷂", "䷃", "䷄", "䷅", "䷆", "䷇", "䷈", "䷉", "䷊", "䷋", "䷌", "䷍", "䷎", "䷏", "䷐", "䷑", "䷒", "䷓", "䷔", "䷕", "䷖", "䷗", "䷘", "䷙", "䷚", "䷛", "䷜", "䷝", "䷞", "䷟", "䷠", "䷡", "䷢", "䷣", "䷤", "䷥", "䷦", "䷧", "䷨", "䷩", "䷪", "䷫", "䷬", "䷭", "䷮", "䷯", "䷰", "䷱", "䷲", "䷳", "䷴", "䷵", "䷶", "䷷", "䷸", "䷹", "䷺", "䷻", "䷼", "䷽", "䷾", "䷿"], + ["▌", "▛", "▜", "▐", "▟", "▙"], + ["°", "º", "¤", "ø", ",", "¸", "¸", ",", "ø", "¤", "º", "°", "`"], + ["⚪", "⚫"], + ["🌍", "🌎", "🌏"], + ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "], ["🕐", "🕑", "🕒", "🕓", "🕔", "🕕", "🕖", "🕗", "🕘", "🕙", "🕚", "🕛"], - # 94 ["🕜", "🕝", "🕞", "🕟", "🕠", "🕡", "🕢", "🕣", "🕤", "🕥", "🕦", "🕧"], - # 95 - [" 🚴", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", "🚴 ", " "], - # 96 - ["䷀", "䷁", "䷂", "䷃", "䷄", "䷅", "䷆", "䷇", "䷈", "䷉", "䷊", "䷋", "䷌", "䷍", "䷎", "䷏", "䷐", "䷑", "䷒", "䷓", "䷔", "䷕", "䷖", "䷗", "䷘", "䷙", "䷚", "䷛", "䷜", "䷝", "䷞", "䷟", "䷠", "䷡", "䷢", "䷣", "䷤", "䷥", "䷦", "䷧", "䷨", "䷩", "䷪", "䷫", "䷬", "䷭", "䷮", "䷯", "䷰", "䷱", "䷲", "䷳", "䷴", "䷵", "䷶", "䷷", "䷸", "䷹", "䷺", "䷻", "䷼", "䷽", "䷾", "䷿"], - # 97 + ["◡◡", "⊙⊙", "◠◠"], + [". ", ".. ", "..."], + [". ", ".. ", "...", " ..", " .", " "], + ["∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"], + ["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"], + ["[ ]", "[ =]", "[ ==]", "[ ===]", "[====]", "[=== ]", "[== ]", "[= ]"], + [" | ", " \\ ", "_ ", " \\ ", " | ", " / ", " _", " / "], + ["(● )", "( ● )", "( ● )", "( ● )", "( ● )", "( ●)", "( ● )", "( ● )", "( ● )", "( ● )"], + [">))'> ", " >))'> ", " >))'> ", " >))'> ", " >))'>", " <'((< ", " <'((< ", " <'((< "], + [">>---> ", " >>---> ", " >>---> ", " >>---> ", " >>--->", " <---<<", " <---<< ", " <---<< ", " <---<< ", "<---<< "], + ["| ", "|| ", "||| ", "|||| ", "||||| ", "|||||| ", "||||||| ", "||||||||", "||||||| ", "|||||| ", "||||| ", "|||| ", "||| ", "|| ", "| "], + ["[ ]", "[= ]", "[== ]", "[=== ]", "[==== ]", "[===== ]", "[====== ]", "[======= ]", "[======== ]", "[========= ]", "[==========]"], + ["(*---------)", "(-*--------)", "(--*-------)", "(---*------)", "(----*-----)", "(-----*----)", "(------*---)", "(-------*--)", "(--------*-)", "(---------*)"], + ["█▒▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "█████▒▒▒▒▒", "███████▒▒▒", "██████████"], + ["[ ]", "[> ]", "[=> ]", "[===> ]", "[=====> ]", "[======> ]", "[========> ]", "[=========>]", "[ =========]", "[ ========]", "[ =======]", "[ ======]", "[ =====]", "[ ====]", "[ ===]", "[ ==]", "[ =]"], + ["[>>> >]", "[]>>>> []", "[] >>>> []", "[] >>>> []", "[] >>>> []", "[] >>>>[]", "[>> >>]"], + [" . . . .", ". . . .", ". . . .", ". . . .", ". . . . ", ". . . . ."], + [" | ", " / ", " _ ", " \\ ", " | ", " \\ ", " _ ", " / "], + ["▐|\\____________▌", "▐_|\\___________▌", "▐__|\\__________▌", "▐___|\\_________▌", "▐____|\\________▌", "▐_____|\\_______▌", "▐______|\\______▌", "▐_______|\\_____▌", "▐________|\\____▌", "▐_________|\\___▌", "▐__________|\\__▌", "▐___________|\\_▌", "▐____________|\\▌", "▐____________/|▌", "▐___________/|_▌", "▐__________/|__▌", "▐_________/|___▌", "▐________/|____▌", "▐_______/|_____▌", "▐______/|______▌", "▐_____/|_______▌", "▐____/|________▌", "▐___/|_________▌", "▐__/|__________▌", "▐_/|___________▌", "▐/|____________▌"], + ["▐⠂ ▌", "▐⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂▌", "▐ ⠠▌", "▐ ⡀▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐⠠ ▌"], + ["________", "-_______", "_-______", "__-_____", "___-____", "____-___", "_____-__", "______-_", "_______-", "________", "_______-", "______-_", "_____-__", "____-___", "___-____", "__-_____", "_-______", "-_______", "________"], + ["|_______", "_/______", "__-_____", "___\\____", "____|___", "_____/__", "______-_", "_______\\", "_______|", "______\\_", "_____-__", "____/___", "___|____", "__\\_____", "_-______"], + ["██▒▒▒▒", "▒██▒▒▒", "▒▒██▒▒", "▒▒▒██▒", "▒▒▒▒██", "▒▒▒▒▒█", "▒▒▒▒▒▒", "█▒▒▒▒▒"], + [" ", "█ ", "██ ", "███ ", " ███ ", " ███ ", " ███ ", " ██", " █", " "], + [" 🚴", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", "🚴 ", " ", " ", " "], ["▒▒▒▒▒▒▒▒▒▒", "█▒▒▒▒▒▒▒▒▒", "██▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "████▒▒▒▒▒▒", "█████▒▒▒▒▒", "██████▒▒▒▒", "███████▒▒▒", "████████▒▒", "█████████▒", "██████████", "██████████", "▒█████████", "▒▒████████", "▒▒▒███████", "▒▒▒▒██████", "▒▒▒▒▒█████", "▒▒▒▒▒▒████", "▒▒▒▒▒▒▒███", "▒▒▒▒▒▒▒▒██", "▒▒▒▒▒▒▒▒▒█", "▒▒▒▒▒▒▒▒▒▒"], - # 98 - ["▌", "▛", "▜", "▐", "▟", "▙"], - # 99 - ["♫♬♩◖(● o ●)◗♩♬♫", "♩♫♬◖(● o ●)◗♬♫c", "♪♪♫◖(● o ●)◗♫♪♪", "♬♩♪◖(● o ●)◗♪♩♬", "♬♩♪◖(● o ●)◗♪♩♬", "♪♪♫◖(● o ●)◗♫♪♪", "♩♫♬◖(● o ●)◗♬♫♩", "♫♬♩◖(● o ●)◗♩♬♫"], - # 100 ["``'-.,", "`'-.,_", "'-.,_,", "-.,_,.", ".,_,.-", ",_,.-'", "_,.-'`", ",.-'``", ".-'``'", "-'``'-", "'``'-."], - # 101 ["``'-.,_,.-'", "`'-.,_,.-'`", "'-.,_,.-'``", "-.,_,.-'``'", ".,_,.-'``'-", ",_,.-'``'-.", "_,.-'``'-.,", ",.-'``'-.,_", ".-'``'-.,_,", "-'``'-.,_,.", "'``'-.,_,.="], - # 102 - ["°", "º", "¤", "ø", ",", "¸", "¸", ",", "ø", "¤", "º", "°", "`"], - # 103 ["°º¤ø,¸¸", "º¤ø,¸¸,", "¤ø,¸¸,ø", "ø,¸¸,ø¤", ",¸¸,ø¤º", "¸¸,ø¤º°", "¸,ø¤º°`", ",ø¤º°`°", "ø¤º°`°º", "¤º°`°º¤", "º°`°º¤ø", "°`°º¤ø,", "`°º¤ø,¸"], - # 104 ["°º¤ø,¸¸,ø¤º", "º¤ø,¸¸,ø¤º°", "¤ø,¸¸,ø¤º°`", "ø,¸¸,ø¤º°`°", ",¸¸,ø¤º°`°º", "¸¸,ø¤º°`°º¤", "¸,ø¤º°`°º¤ø", ",ø¤º°`°º¤ø,", "ø¤º°`°º¤ø,¸", "¤º°`°º¤ø,¸¸", "º°`°º¤ø,¸¸,", "°`°º¤ø,¸¸,ø", "`°º¤ø,¸¸,ø¤"], - # 105 + ["`、ヽ`ヽ`、ヽ", "ヽ`、ヽ`ヽ`、", "、ヽ`、ヽ`ヽ`", "`、ヽ`、ヽ`ヽ", "ヽ`、ヽ`、ヽ`", "`ヽ`、ヽ`、ヽ", "ヽ`ヽ`、ヽ`、"], ["(-.-)......", "(-.-)z.....", "(-.-)zz....", "(-.-)Zzz...", "(-.-)ZZzz..", "(-.-)zZZzz.", "(-.-)zzZZzz", "(-.-)zzzZZz", "(-.-)zzzzZZ", "(-.-)zzzzzZ", "(-.-)zzzzzz", "(-.-).zzzzz", "(-.-)..zzzz", "(-.-)...zzz", "(-.-)....zz", "(-.-).....z", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......"], - # 106 ["(∩^o^)⊃━・☆。*・゚*", "(∩^o^)⊃━。・*☆・*゚", "(∩^o^)⊃━☆*゚。・*・", "(∩^o^)⊃━☆・*゚・*。", "(∩^o^)⊃━。☆**・・゚", "(∩^o^)⊃━*☆゚。*・・", "(∩^o^)⊃━*゚。☆・・*", "(∩^o^)⊃━*・。・☆*゚", "(∩^o^)⊃━・。・☆*゚*", "(∩^o^)⊃━*・・*゚。☆", "(∩^o^)⊃━。*☆゚*・・", "(∩^o^)⊃━*゚・・。*☆"], - # 107 ["(ノ>ω<)ノ・:’’,・・", "(ノ>ω<)ノ・゚:,★゚*", "(ノ>ω<)ノ★:・:゚:,", "(ノ>ω<)ノ*:。’゚・・", "(ノ>ω<)ノ゚。’:*:・", "(ノ>ω<)ノ・:。 ゚:・", "(ノ>ω<)ノ★::・・’’", "(ノ>ω<)ノ:☆゚・*,:", "(ノ>ω<)ノ★’: 。’:", "(ノ>ω<)ノ :*・:*’", "(ノ>ω<)ノ。:::*・゚", "(ノ>ω<)ノ・:::゚’★", "(ノ>ω<)ノ★,:。:。・", "(ノ>ω<)ノ: ,**・:", "(ノ>ω<)ノ・’’:゚::", "(ノ>ω<)ノ**。 ’::", "(ノ>ω<)ノ’:★・☆,*", "(ノ>ω<)ノ。 :,’*★", "(ノ>ω<)ノ:★:☆・・*", "(ノ>ω<)ノ・:゚’* ・"], - # 108 ["(ノ◕ヮ◕)ノ゚*:・゚✧", "(ノ◕ヮ◕)ノ***:・゚", "(ノ◕ヮ◕)ノ✧:**:・", "(ノ◕ヮ◕)ノ✧✧:**:", "(ノ◕ヮ◕)ノ・゚✧:**", "(ノ◕ヮ◕)ノ・・゚✧:*", "(ノ◕ヮ◕)ノ✧✧・゚✧:", "(ノ◕ヮ◕)ノ゚゚✧・゚✧", "(ノ◕ヮ◕)ノ**゚✧・゚", "(ノ◕ヮ◕)ノ*:*゚✧・", "(ノ◕ヮ◕)ノ*・:*゚✧", "(ノ◕ヮ◕)ノ*:・:*゚", "(ノ◕ヮ◕)ノ*゚:・:*", "(ノ◕ヮ◕)ノ・・゚:・:", "(ノ◕ヮ◕)ノ:*・゚:・", "(ノ◕ヮ◕)ノ゚✧*・゚:", "(ノ◕ヮ◕)ノ・✧✧*・゚", "(ノ◕ヮ◕)ノ:・✧✧*・", "(ノ◕ヮ◕)ノ:゚・✧✧*", "(ノ◕ヮ◕)ノ✧*゚・✧✧"], - # 109 - ["( ˘ ɜ˘) ♬♪♫", "( ˘ ɜ˘) ♫♬♪", "( ˘ ɜ˘) ♪♫♬", "( ˘ ɜ˘) ♬♪♫", "( ˘ ɜ˘) ♫♬♪", "( ˘ ˘) ♫♬", "( ˘ ˘) ♫", "( ˘ ˘) ", "( ˘ ˘) ", "( ˘ ɜ˘) ", "( ˘ ɜ˘) ♬ ", "( ˘ ɜ˘) ♪♬ "], - # 110 - ["`、ヽ`ヽ`、ヽ", "ヽ`、ヽ`ヽ`、", "、ヽ`、ヽ`ヽ`", "`、ヽ`、ヽ`ヽ", "ヽ`、ヽ`、ヽ`", "`ヽ`、ヽ`、ヽ", "ヽ`ヽ`、ヽ`、"], -] \ No newline at end of file + ["( ˘ ɜ˘)♫ ", "( ˘ ɜ˘)♪♫ ", "( ˘ ɜ˘)♬♪♫ ", "( ˘ ɜ˘)♩♬♪♫", "( ˘ ɜ˘)♬♩♬♪", "( ˘ ɜ˘)♩♬♩♬", "( ˘ ˘) ♪♩♬", "( ˘ ˘) ♪♩", "( ˘ ɜ˘)♬ ♪", "( ˘ ɜ˘)♩♬ ", "( ˘ ˘) ♩♬ ", "( ˘ ɜ˘)♬ ♩♬", "( ˘ ɜ˘)♪♬ ♩", "( ˘ ɜ˘)♩♪♬ ", "( ˘ ɜ˘)♪♩♪♬", "( ˘ ˘) ♪♩♪", "( ˘ ˘) ♪♩", "( ˘ ˘) ♪", "( ˘ ˘) "], + ["♫♬♩◖(● o ●)◗♩♬♫", "♩♫♬◖(● o ●)◗♬♫c", "♪♪♫◖(● o ●)◗♫♪♪", "♬♩♪◖(● o ●)◗♪♩♬", "♬♩♪◖(● o ●)◗♪♩♬", "♪♪♫◖(● o ●)◗♫♪♪", "♩♫♬◖(● o ●)◗♬♫♩", "♫♬♩◖(● o ●)◗♩♬♫"], + ["♫♬♩◖(⎺ ⎺)◗♩♬♫", "♩♫♬◖(⎻ ⎻)◗♬♫c", "♪♪♫◖(⎼ ⎼)◗♫♪♪", "♬♩♪◖(⎻ ⎻)◗♪♩♬", "♬♩♪◖(⎺ ⎺)◗♪♩♬", "♪♪♫◖(⎻ ⎻)◗♫♪♪", "♩♫♬◖(⎼ ⎼)◗♬♫♩", "♫♬♩◖(⎻ ⎻)◗♩♬♫"], + ["♫♬♩◖(⎺ ⎺)◗♩♬♫", "♩♫♬◖(⎺ ⎺)◗♬♫c", "♪♪♫◖(⎺ ⎺)◗♫♪♪", "♬♩♪◖(⎻ ⎻)◗♪♩♬", "♬♩♪◖(⎻ ⎻)◗♪♩♬", "♪♪♫◖(⎻ ⎻)◗♫♪♪", "♩♫♬◖(⎻ ⎻)◗♬♫♩", "♫♬♩◖(⎺ ⎺)◗♩♬♫"] +] \ No newline at end of file From eaaa4a69d0dcfff739f4edcfe51b17adb18eb7de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20Doucet=20Beaupr=C3=A9?= Date: Fri, 24 Nov 2023 17:46:02 -0500 Subject: [PATCH 12/12] fixed const and docstring, NOTICE for orig apache license, allows varlen string spinners --- src/ProgressMeter.jl | 12 +-- src/spinners.jl | 222 ++++++++++++++++++++++--------------------- 2 files changed, 121 insertions(+), 113 deletions(-) diff --git a/src/ProgressMeter.jl b/src/ProgressMeter.jl index 11df525..b6b3fb8 100644 --- a/src/ProgressMeter.jl +++ b/src/ProgressMeter.jl @@ -5,6 +5,9 @@ using Distributed export Progress, ProgressThresh, ProgressUnknown, BarGlyphs, next!, update!, cancel, finish!, @showprogress, progress_map, progress_pmap, ijulia_behavior +export spinnercollection, demospinners +include("spinners.jl") + """ `ProgressMeter` contains a suite of utilities for displaying progress in long-running computations. The major functions/types in this module @@ -388,19 +391,16 @@ function updateProgress!(p::ProgressThresh; showvalues = (), end end -export spinnercollection, demospinners -include("spinners.jl") - const default_spinner_chars = spinnercollection[1] const default_spinner_done = '✓' spinner_char(p::ProgressUnknown, spinner::AbstractChar) = spinner -spinner_char(p::ProgressUnknown, spinner::Union{AbstractVector{<:AbstractChar}, AbstractVector{<:AbstractString}}) = +spinner_char(p::ProgressUnknown, spinner::AbstractVector{<:AbstractChar}) = p.done ? default_spinner_done : spinner[p.spincounter % length(spinner) + firstindex(spinner)] -spinner_char(p::ProgressUnknown, spinner::Int) = - p.done ? default_spinner_done : spinnercollection[spinner][p.spincounter % length(spinnercollection[spinner]) + firstindex(spinnercollection[spinner])] +spinner_char(p::ProgressUnknown, spinner::Union{AbstractVector{<:AbstractChar}, AbstractVector{<:AbstractString}}) = rpad(p.done ? default_spinner_done : spinner[p.spincounter % length(spinner) + firstindex(spinner)], maximum(length, spinner)) spinner_char(p::ProgressUnknown, spinner::AbstractString) = p.done ? default_spinner_done : spinner[nextind(spinner, 1, p.spincounter % length(spinner))] +spinner_char(p::ProgressUnknown, spinner::Int) = spinner_char(p::ProgressUnknown, spinnercollection[spinner]) function updateProgress!(p::ProgressUnknown; showvalues = (), truncate_lines = false, valuecolor = :blue, desc = p.desc, ignore_predictor = false, diff --git a/src/spinners.jl b/src/spinners.jl index 52de2fc..9786323 100644 --- a/src/spinners.jl +++ b/src/spinners.jl @@ -1,28 +1,35 @@ -""" -89 out of the following spinners were taken from https://github.com/briandowns/spinner +# Included in the collection are 91 spinners from https://github.com/briandowns/spinner -Copyright (c) 2022 Brian J. Downs +# Copyright (c) 2022 Brian J. Downs -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTICE OF CHANGES FROM https://github.com/briandowns/spinner +# - original spinners have been reordered +# - original spinner 36 (here 89) has been shorted +# - removed original spinner 60 (duplicate of 28) +# - original spinners 12, 31, 52, and 67 (here 83, 84, 82, and 43) have additional elements + +# 23 new spinners under MIT license (index 66, 67, 68, 69, 88, 97-114) +# Copyright (c) 2023 Alice Doucet Beaupré -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" """ demospinners(spinners; delay=0.12) -Demo a collection of spinners, each assumed to be given by either a Vector{Char} or a Vector{String}. +Demo a collection of `spinners`. Can be a mix of Vector{Char}, and Vector{String}. """ function demospinners(spinners; delay=0.12) - # We'll display an index [k] next to each spinner. # If there are 9 or less spinners, then those will # be 3 char wide ([1]...[9]). If there are between 10 @@ -52,7 +59,7 @@ function demospinners(spinners; delay=0.12) termheight, current_tw = displaysize(stdout) colwidths, nbcols, nbrows = find_colwidths(fixedlens, current_tw) - spinnercounters = zeros(Int, length(spinners)) + spinnercounters = ones(Int, length(spinners)) # clear terminal print("\033[2J\033[H") @@ -71,7 +78,7 @@ function demospinners(spinners; delay=0.12) colwidth = colwidths[colidx] if rowidx <= termheight - msg = @sprintf "\u1b[34m[%s]\u1b[32m %s " lpad("$k", lenmaxidx) spinners[k][spinnercounters[k]+1] + msg = @sprintf "\u1b[34m[%s]\u1b[32m %s " lpad("$k", lenmaxidx) spinners[k][spinnercounters[k]] # ^^^^ ^^^^ = +8 msg = rpad(msg, colwidth + 8) # +8 accounts for ANSI escape sequences. # textwidth used by lpad/rpad does not count \u1b @@ -80,7 +87,7 @@ function demospinners(spinners; delay=0.12) println() end end - spinnercounters[k] = (spinnercounters[k] + 1) % length(spinners[k]) + spinnercounters[k] = spinnercounters[k] % length(spinners[k]) + firstindex(spinners[k]) end print("\r\u1b[A"^min(nbrows, termheight)) sleep(delay) @@ -100,14 +107,14 @@ demospinners(; delay=0.12) = demospinners(spinnercollection, delay=delay) Demo the `k`th spinner in the default spinner collection. """ -demospinners(k::Int; delay=0.12) = demospinners([spinnercollection[k]], delay=delay) +demospinners(k::Int; delay=0.12) = demospinners(spinnercollection[k], delay=delay) """ demospinners(spinner::AbstractString; delay=0.12) Demo a custom `spinner` given by the characters of a string. """ -demospinners(spinner::AbstractString; delay=0.12) = demospinners([collect(spinner)], delay=delay) +demospinners(spinner::AbstractString; delay=0.12) = demospinners(collect(spinner), delay=delay) """ demospinners(spinner::Union{AbstractVector{<:AbstractString}, AbstractVector{<:AbstractChar}}; delay=0.12) @@ -116,118 +123,119 @@ Demo a custom `spinner` given by a vector of characters or strings. """ demospinners(spinner::Union{AbstractVector{<:AbstractString}, AbstractVector{<:AbstractChar}}; delay=0.12) = demospinners([spinner], delay=delay) -const spinnercollection::Vector{Vector{String}} = [ - ["◐", "◓", "◑", "◒"], - ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"], - ["▁", "▃", "▄", "▅", "▆", "▇", "█", "▇", "▆", "▅", "▄", "▃", "▁"], - ["▖", "▘", "▝", "▗"], - ["┤", "┘", "┴", "└", "├", "┌", "┬", "┐"], - ["◢", "◣", "◤", "◥"], - ["◰", "◳", "◲", "◱"], - ["◴", "◷", "◶", "◵"], - [".", "o", "O", "@", "*"], - ["|", "/", "-", "\\"], - ["◜", "◝", "◞", "◟"], - ["⬒", "⬔", "⬓", "⬕"], - ["⬖", "⬘", "⬗", "⬙"], - ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"], - ["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"], - ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"], - ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], - ["▉", "▊", "▋", "▌", "▍", "▎", "▏", "▎", "▍", "▌", "▋", "▊", "▉"], - ["■", "□", "▪", "▫"], - ["←", "↑", "→", "↓"], - ["╫", "╪"], - ["♠", "♣", "♥", "♦"], - ["➞", "➟", "➠", "➡", "➠", "➟"], - ["⇐", "⇖", "⇑", "⇗", "⇒", "⇘", "⇓", "⇙"], - ["⠁", "⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈", "⠈"], - ["⠈", "⠉", "⠋", "⠓", "⠒", "⠐", "⠐", "⠒", "⠖", "⠦", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈"], - ["⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠴", "⠲", "⠒", "⠂", "⠂", "⠒", "⠚", "⠙", "⠉", "⠁"], - ["⠋", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋"], - ["ヲ", "ァ", "ィ", "ゥ", "ェ", "ォ", "ャ", "ュ", "ョ", "ッ", "ア", "イ", "ウ", "エ", "オ", "カ", "キ", "ク", "ケ", "コ", "サ", "シ", "ス", "セ", "ソ", "タ", "チ", "ツ", "テ", "ト", "ナ", "ニ", "ヌ", "ネ", "ノ", "ハ", "ヒ", "フ", "ヘ", "ホ", "マ", "ミ", "ム", "メ", "モ", "ヤ", "ユ", "ヨ", "ラ", "リ", "ル", "レ", "ロ", "ワ", "ン"], - ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█", "▉", "▊", "▋", "▌", "▍", "▎", "▏", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█", "▇", "▆", "▅", "▄", "▃", "▂", "▁"], - [".", "o", "O", "°", "O", "o", "."], - ["+", "x"], - ["v", "<", "^", ">"], - ["⎺", "⎻", "⎼", "⎽", "⎼", "⎻"], - ["✶", "✸", "✹", "✺", "✹", "✷"], - ["¿", "?"], - [".", "o", "O", "°", "O", "o", "."], - ["▓", "▒", "░"], - ["▌", "▀", "▐", "▄"], - ["⊶", "⊷"], - ["▪", "▫"], - ["□", "■"], - ["▮", "▯"], - ["-", "=", "≡"], - ["d", "q", "p", "b"], - ["⢹", "⢺", "⢼", "⣸", "⣇", "⡧", "⡗", "⡏"], - ["☗", "☖"], - ["⧇", "⧆"], - ["◉", "◎"], - ["㊂", "㊀", "㊁"], - ["⦾", "⦿"], - ["ဝ", "၀"], - ["▌ ", "▀ ", "▐▄"], - ["⠈⠁", "⠈⠑", "⠈⠱", "⠈⡱", "⢀⡱", "⢄⡱", "⢄⡱", "⢆⡱", "⢎⡱", "⢎⡰", "⢎⡠", "⢎⡀", "⢎⠁", "⠎⠁", "⠊⠁"], - ["⢄", "⢂", "⢁", "⡁", "⡈", "⡐", "⡠"], - ["□", "◱", "◧", "▣", "■"], - ["□", "◱", "▨", "▩", "■"], - ["░", "▒", "▓", "█"], - ["░", "█"], - ["◯", "⬤"], - ["▱", "▰"], - ["➊", "➋", "➌", "➍", "➎", "➏", "➐", "➑", "➒", "➓"], - ["⚀", "⚂", "⚄", "⚄", "⚀", "⚀", "⚀", "⚄", "⚅", "⚀", "⚃", "⚀", "⚄", "⚀", "⚄", "⚅", "⚅", "⚀", "⚅", "⚅"], - ["½", "⅓", "⅔", "¼", "¾", "⅛", "⅜", "⅝", "⅞"], - ["↞", "↟", "↠", "↡"], - ["♈", "♉", "♊", "♋", "♌", "♍", "♎", "♏", "♐", "♑", "♒", "♓"], - ["䷀", "䷁", "䷂", "䷃", "䷄", "䷅", "䷆", "䷇", "䷈", "䷉", "䷊", "䷋", "䷌", "䷍", "䷎", "䷏", "䷐", "䷑", "䷒", "䷓", "䷔", "䷕", "䷖", "䷗", "䷘", "䷙", "䷚", "䷛", "䷜", "䷝", "䷞", "䷟", "䷠", "䷡", "䷢", "䷣", "䷤", "䷥", "䷦", "䷧", "䷨", "䷩", "䷪", "䷫", "䷬", "䷭", "䷮", "䷯", "䷰", "䷱", "䷲", "䷳", "䷴", "䷵", "䷶", "䷷", "䷸", "䷹", "䷺", "䷻", "䷼", "䷽", "䷾", "䷿"], - ["▌", "▛", "▜", "▐", "▟", "▙"], - ["°", "º", "¤", "ø", ",", "¸", "¸", ",", "ø", "¤", "º", "°", "`"], - ["⚪", "⚫"], - ["🌍", "🌎", "🌏"], - ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "], - ["🕐", "🕑", "🕒", "🕓", "🕔", "🕕", "🕖", "🕗", "🕘", "🕙", "🕚", "🕛"], - ["🕜", "🕝", "🕞", "🕟", "🕠", "🕡", "🕢", "🕣", "🕤", "🕥", "🕦", "🕧"], +const spinnercollection = [ + ['◐', '◓', '◑', '◒'], # ◐◓◑◒ + ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙'], # ←↖↑↗→↘↓↙ + ['▁', '▃', '▄', '▅', '▆', '▇', '█', '▇', '▆', '▅', '▄', '▃', '▁'], # ▁▃▄▅▆▇█▇▆▅▄▃▁ + ['▖', '▘', '▝', '▗'], # ▖▘▝▗ + ['┤', '┘', '┴', '└', '├', '┌', '┬', '┐'], # ┤┘┴└├┌┬┐ + ['◢', '◣', '◤', '◥'], # ◢◣◤◥ + ['◰', '◳', '◲', '◱'], # ◰◳◲◱ + ['◴', '◷', '◶', '◵'], # ◴◷◶◵ + ['.', 'o', 'O', '@', '*'], # .oO@* + ['|', '/', '-', '\\'], # |/-\\ + ['◜', '◝', '◞', '◟'], # ◜◝◞◟ + ['⬒', '⬔', '⬓', '⬕'], # ⬒⬔⬓⬕ + ['⬖', '⬘', '⬗', '⬙'], # ⬖⬘⬗⬙ + ['⣾', '⣽', '⣻', '⢿', '⡿', '⣟', '⣯', '⣷'], # ⣾⣽⣻⢿⡿⣟⣯⣷ + ['⠁', '⠂', '⠄', '⡀', '⢀', '⠠', '⠐', '⠈'], # ⠁⠂⠄⡀⢀⠠⠐⠈ + ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'], # ⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏ + ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'], # abcdefghijklmnopqrstuvwxyz + ['▉', '▊', '▋', '▌', '▍', '▎', '▏', '▎', '▍', '▌', '▋', '▊', '▉'], # ▉▊▋▌▍▎▏▎▍▌▋▊▉ + ['■', '□', '▪', '▫'], # ■□▪▫ + ['←', '↑', '→', '↓'], # ←↑→↓ + ['╫', '╪'], # ╫╪ + ['♠', '♣', '♥', '♦'], # ♠♣♥♦ + ['➞', '➟', '➠', '➡', '➠', '➟'], # ➞➟➠➡➠➟ + ['⇐', '⇖', '⇑', '⇗', '⇒', '⇘', '⇓', '⇙'], # ⇐⇖⇑⇗⇒⇘⇓⇙ + ['⠁', '⠁', '⠉', '⠙', '⠚', '⠒', '⠂', '⠂', '⠒', '⠲', '⠴', '⠤', '⠄', '⠄', '⠤', '⠠', '⠠', '⠤', '⠦', '⠖', '⠒', '⠐', '⠐', '⠒', '⠓', '⠋', '⠉', '⠈', '⠈'], # ⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈ + ['⠈', '⠉', '⠋', '⠓', '⠒', '⠐', '⠐', '⠒', '⠖', '⠦', '⠤', '⠠', '⠠', '⠤', '⠦', '⠖', '⠒', '⠐', '⠐', '⠒', '⠓', '⠋', '⠉', '⠈'], # ⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈ + ['⠁', '⠉', '⠙', '⠚', '⠒', '⠂', '⠂', '⠒', '⠲', '⠴', '⠤', '⠄', '⠄', '⠤', '⠴', '⠲', '⠒', '⠂', '⠂', '⠒', '⠚', '⠙', '⠉', '⠁'], # ⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁ + ['⠋', '⠙', '⠚', '⠒', '⠂', '⠂', '⠒', '⠲', '⠴', '⠦', '⠖', '⠒', '⠐', '⠐', '⠒', '⠓', '⠋'], # ⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋ + ['ヲ', 'ァ', 'ィ', 'ゥ', 'ェ', 'ォ', 'ャ', 'ュ', 'ョ', 'ッ', 'ア', 'イ', 'ウ', 'エ', 'オ', 'カ', 'キ', 'ク', 'ケ', 'コ', 'サ', 'シ', 'ス', 'セ', 'ソ', 'タ', 'チ', 'ツ', 'テ', 'ト', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'ヒ', 'フ', 'ヘ', 'ホ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ン'], # ヲァィゥェォャュョッアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン + ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█', '▉', '▊', '▋', '▌', '▍', '▎', '▏', '▏', '▎', '▍', '▌', '▋', '▊', '▉', '█', '▇', '▆', '▅', '▄', '▃', '▂', '▁'], # ▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▏▎▍▌▋▊▉█▇▆▅▄▃▂▁ + ['.', 'o', 'O', '°', 'O', 'o', '.'], # .oO°Oo. + ['+', 'x'], # +x + ['v', '<', '^', '>'], # v<^> + ['⎺', '⎻', '⎼', '⎽', '⎼', '⎻'], # ⎺⎻⎼⎽⎼⎻ + ['✶', '✸', '✹', '✺', '✹', '✷'], # ✶✸✹✺✹✷ + ['¿', '?'], # ¿? + ['▓', '▒', '░'], # ▓▒░ + ['▌', '▀', '▐', '▄'], # ▌▀▐▄ + ['⊶', '⊷'], # ⊶⊷ + ['▪', '▫'], # ▪▫ + ['□', '■'], # □■ + ['▮', '▯'], # ▮▯ + ['-', '=', '≡', '='], # -=≡ + ['d', 'q', 'p', 'b'], # dqpb + ['⢹', '⢺', '⢼', '⣸', '⣇', '⡧', '⡗', '⡏'], # ⢹⢺⢼⣸⣇⡧⡗⡏ + ['☗', '☖'], # ☗☖ + ['⧇', '⧆'], # ⧇⧆ + ['◉', '◎'], # ◉◎ + ['㊂', '㊀', '㊁'], # ㊂㊀㊁ + ['⦾', '⦿'], # ⦾⦿ + ['ဝ', '၀'], # ဝ၀ + ['▌', '▀', '▐', '▄'], # ▌ ▀ ▐▄ + ["⠈⠁", "⠈⠑", "⠈⠱", "⠈⡱", "⢀⡱", "⢄⡱", "⢄⡱", "⢆⡱", "⢎⡱", "⢎⡰", "⢎⡠", "⢎⡀", "⢎⠁", "⠎⠁", "⠊⠁"], # ⠈⠁ ⠈⠑ ⠈⠱ ⠈⡱ ⢀⡱ ⢄⡱ ⢄⡱ ⢆⡱ ⢎⡱ ⢎⡰ ⢎⡠ ⢎⡀ ⢎⠁ ⠎⠁ ⠊⠁ + ['⢄', '⢂', '⢁', '⡁', '⡈', '⡐', '⡠'], # ⢄⢂⢁⡁⡈⡐⡠ + ['□', '◱', '◧', '▣', '■'], # □◱◧▣■ + ['□', '◱', '▨', '▩', '■'], # □◱▨▩■ + ['░', '▒', '▓', '█'], # ░▒▓█ + ['░', '█'], # ░█ + ['◯', '⬤'], # ◯⬤ + ['▱', '▰'], # ▱▰ + ['➊', '➋', '➌', '➍', '➎', '➏', '➐', '➑', '➒', '➓'], # ➊➋➌➍➎➏➐➑➒➓ + ['⚀', '⚂', '⚄', '⚄', '⚀', '⚀', '⚀', '⚄', '⚅', '⚀', '⚃', '⚀', '⚄', '⚀', '⚄', '⚅', '⚅', '⚀', '⚅', '⚅'], # ⚀⚂⚄⚄⚀⚀⚀⚄⚅⚀⚃⚀⚄⚀⚄⚅⚅⚀⚅⚅ + ['½', '⅓', '⅔', '¼', '¾', '⅛', '⅜', '⅝', '⅞'], # ½⅓⅔¼¾⅛⅜⅝⅞ + ['↞', '↟', '↠', '↡'], # ↞↟↠↡ + ['♈', '♉', '♊', '♋', '♌', '♍', '♎', '♏', '♐', '♑', '♒', '♓'], # ♈♉♊♋♌♍♎♏♐♑♒♓ + ['䷀', '䷁', '䷂', '䷃', '䷄', '䷅', '䷆', '䷇', '䷈', '䷉', '䷊', '䷋', '䷌', '䷍', '䷎', '䷏', '䷐', '䷑', '䷒', '䷓', '䷔', '䷕', '䷖', '䷗', '䷘', '䷙', '䷚', '䷛', '䷜', '䷝', '䷞', '䷟', '䷠', '䷡', '䷢', '䷣', '䷤', '䷥', '䷦', '䷧', '䷨', '䷩', '䷪', '䷫', '䷬', '䷭', '䷮', '䷯', '䷰', '䷱', '䷲', '䷳', '䷴', '䷵', '䷶', '䷷', '䷸', '䷹', '䷺', '䷻', '䷼', '䷽', '䷾', '䷿'], # ䷀䷁䷂䷃䷄䷅䷆䷇䷈䷉䷊䷋䷌䷍䷎䷏䷐䷑䷒䷓䷔䷕䷖䷗䷘䷙䷚䷛䷜䷝䷞䷟䷠䷡䷢䷣䷤䷥䷦䷧䷨䷩䷪䷫䷬䷭䷮䷯䷰䷱䷲䷳䷴䷵䷶䷷䷸䷹䷺䷻䷼䷽䷾䷿ + ['▌', '▛', '▜', '▐', '▟', '▙'], # ▌▛▜▐▟▙ + ['°', 'º', '¤', 'ø', ',', '¸', '¸', ',', 'ø', '¤', 'º', '°', '`'], # °º¤ø,¸¸,ø¤º°` + ['⚪', '⚫'], # ⚪⚫ + ['🌍', '🌎', '🌏'], # 🌍🌎🌏 + ['🌑', '🌒', '🌓', '🌔', '🌕', '🌖', '🌗', '🌘'], # 🌑🌒🌓🌔🌕🌖🌗🌘 + ['🕐', '🕑', '🕒', '🕓', '🕔', '🕕', '🕖', '🕗', '🕘', '🕙', '🕚', '🕛'], # 🕐🕑🕒🕓🕔🕕🕖🕗🕘🕙🕚🕛 + ['🕜', '🕝', '🕞', '🕟', '🕠', '🕡', '🕢', '🕣', '🕤', '🕥', '🕦', '🕧'], # 🕜🕝🕞🕟🕠🕡🕢🕣🕤🕥🕦🕧 ["◡◡", "⊙⊙", "◠◠"], - [". ", ".. ", "..."], - [". ", ".. ", "...", " ..", " .", " "], + [".", "..", "..."], + [".", "..", "...", " ..", " .", " "], ["∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"], ["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"], ["[ ]", "[ =]", "[ ==]", "[ ===]", "[====]", "[=== ]", "[== ]", "[= ]"], - [" | ", " \\ ", "_ ", " \\ ", " | ", " / ", " _", " / "], + [" |", " \\", "_", " \\", " |", " /", " _", " / "], ["(● )", "( ● )", "( ● )", "( ● )", "( ● )", "( ●)", "( ● )", "( ● )", "( ● )", "( ● )"], - [">))'> ", " >))'> ", " >))'> ", " >))'> ", " >))'>", " <'((< ", " <'((< ", " <'((< "], - [">>---> ", " >>---> ", " >>---> ", " >>---> ", " >>--->", " <---<<", " <---<< ", " <---<< ", " <---<< ", "<---<< "], - ["| ", "|| ", "||| ", "|||| ", "||||| ", "|||||| ", "||||||| ", "||||||||", "||||||| ", "|||||| ", "||||| ", "|||| ", "||| ", "|| ", "| "], + [">))'>", " >))'>", " >))'>", " >))'>", " >))'>", " <'((<", " <'((<", " <'((< "], + [">>--->", " >>--->", " >>--->", " >>--->", " >>--->", " <---<<", " <---<<", " <---<<", " <---<<", "<---<<"], + ["|", "||", "|||", "||||", "|||||", "||||||", "|||||||", "||||||||", "|||||||", "||||||", "|||||", "||||", "|||", "||", "| "], ["[ ]", "[= ]", "[== ]", "[=== ]", "[==== ]", "[===== ]", "[====== ]", "[======= ]", "[======== ]", "[========= ]", "[==========]"], ["(*---------)", "(-*--------)", "(--*-------)", "(---*------)", "(----*-----)", "(-----*----)", "(------*---)", "(-------*--)", "(--------*-)", "(---------*)"], ["█▒▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "█████▒▒▒▒▒", "███████▒▒▒", "██████████"], ["[ ]", "[> ]", "[=> ]", "[===> ]", "[=====> ]", "[======> ]", "[========> ]", "[=========>]", "[ =========]", "[ ========]", "[ =======]", "[ ======]", "[ =====]", "[ ====]", "[ ===]", "[ ==]", "[ =]"], ["[>>> >]", "[]>>>> []", "[] >>>> []", "[] >>>> []", "[] >>>> []", "[] >>>>[]", "[>> >>]"], - [" . . . .", ". . . .", ". . . .", ". . . .", ". . . . ", ". . . . ."], - [" | ", " / ", " _ ", " \\ ", " | ", " \\ ", " _ ", " / "], + [" . . . .", ". . . .", ". . . .", ". . . .", ". . . .", ". . . . ."], + [" |", " /", " _", " \\", " |", " \\", " _", " / "], ["▐|\\____________▌", "▐_|\\___________▌", "▐__|\\__________▌", "▐___|\\_________▌", "▐____|\\________▌", "▐_____|\\_______▌", "▐______|\\______▌", "▐_______|\\_____▌", "▐________|\\____▌", "▐_________|\\___▌", "▐__________|\\__▌", "▐___________|\\_▌", "▐____________|\\▌", "▐____________/|▌", "▐___________/|_▌", "▐__________/|__▌", "▐_________/|___▌", "▐________/|____▌", "▐_______/|_____▌", "▐______/|______▌", "▐_____/|_______▌", "▐____/|________▌", "▐___/|_________▌", "▐__/|__________▌", "▐_/|___________▌", "▐/|____________▌"], ["▐⠂ ▌", "▐⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂▌", "▐ ⠠▌", "▐ ⡀▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐⠠ ▌"], ["________", "-_______", "_-______", "__-_____", "___-____", "____-___", "_____-__", "______-_", "_______-", "________", "_______-", "______-_", "_____-__", "____-___", "___-____", "__-_____", "_-______", "-_______", "________"], ["|_______", "_/______", "__-_____", "___\\____", "____|___", "_____/__", "______-_", "_______\\", "_______|", "______\\_", "_____-__", "____/___", "___|____", "__\\_____", "_-______"], ["██▒▒▒▒", "▒██▒▒▒", "▒▒██▒▒", "▒▒▒██▒", "▒▒▒▒██", "▒▒▒▒▒█", "▒▒▒▒▒▒", "█▒▒▒▒▒"], - [" ", "█ ", "██ ", "███ ", " ███ ", " ███ ", " ███ ", " ██", " █", " "], - [" 🚴", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", " 🚴 ", "🚴 ", " ", " ", " "], + ["", "█", "██", "███", " ███", " ███", " ███", " ██", " █", " "], + [" 🚴", " 🚴", " 🚴", " 🚴", " 🚴", " 🚴", "🚴", "", "", " "], ["▒▒▒▒▒▒▒▒▒▒", "█▒▒▒▒▒▒▒▒▒", "██▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "████▒▒▒▒▒▒", "█████▒▒▒▒▒", "██████▒▒▒▒", "███████▒▒▒", "████████▒▒", "█████████▒", "██████████", "██████████", "▒█████████", "▒▒████████", "▒▒▒███████", "▒▒▒▒██████", "▒▒▒▒▒█████", "▒▒▒▒▒▒████", "▒▒▒▒▒▒▒███", "▒▒▒▒▒▒▒▒██", "▒▒▒▒▒▒▒▒▒█", "▒▒▒▒▒▒▒▒▒▒"], ["``'-.,", "`'-.,_", "'-.,_,", "-.,_,.", ".,_,.-", ",_,.-'", "_,.-'`", ",.-'``", ".-'``'", "-'``'-", "'``'-."], ["``'-.,_,.-'", "`'-.,_,.-'`", "'-.,_,.-'``", "-.,_,.-'``'", ".,_,.-'``'-", ",_,.-'``'-.", "_,.-'``'-.,", ",.-'``'-.,_", ".-'``'-.,_,", "-'``'-.,_,.", "'``'-.,_,.="], ["°º¤ø,¸¸", "º¤ø,¸¸,", "¤ø,¸¸,ø", "ø,¸¸,ø¤", ",¸¸,ø¤º", "¸¸,ø¤º°", "¸,ø¤º°`", ",ø¤º°`°", "ø¤º°`°º", "¤º°`°º¤", "º°`°º¤ø", "°`°º¤ø,", "`°º¤ø,¸"], ["°º¤ø,¸¸,ø¤º", "º¤ø,¸¸,ø¤º°", "¤ø,¸¸,ø¤º°`", "ø,¸¸,ø¤º°`°", ",¸¸,ø¤º°`°º", "¸¸,ø¤º°`°º¤", "¸,ø¤º°`°º¤ø", ",ø¤º°`°º¤ø,", "ø¤º°`°º¤ø,¸", "¤º°`°º¤ø,¸¸", "º°`°º¤ø,¸¸,", "°`°º¤ø,¸¸,ø", "`°º¤ø,¸¸,ø¤"], + ["|-⎻⎺⎻-⎼⎽⎼-|", "|-⎻⎻⎻-⎼⎼⎼-|", "|--⎻---⎼--|", "|---------|", "|--⎼---⎻--|", "|-⎼⎼⎼-⎻⎻⎻-|", "|-⎼⎽⎼-⎻⎺⎻-|", "|-⎼⎼⎼-⎻⎻⎻-|", "|--⎼---⎻--|", "|---------|", "|--⎻---⎼--|", "|-⎻⎻⎻-⎼⎼⎼-|"], ["`、ヽ`ヽ`、ヽ", "ヽ`、ヽ`ヽ`、", "、ヽ`、ヽ`ヽ`", "`、ヽ`、ヽ`ヽ", "ヽ`、ヽ`、ヽ`", "`ヽ`、ヽ`、ヽ", "ヽ`ヽ`、ヽ`、"], ["(-.-)......", "(-.-)z.....", "(-.-)zz....", "(-.-)Zzz...", "(-.-)ZZzz..", "(-.-)zZZzz.", "(-.-)zzZZzz", "(-.-)zzzZZz", "(-.-)zzzzZZ", "(-.-)zzzzzZ", "(-.-)zzzzzz", "(-.-).zzzzz", "(-.-)..zzzz", "(-.-)...zzz", "(-.-)....zz", "(-.-).....z", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......", "(-.-)......"], ["(∩^o^)⊃━・☆。*・゚*", "(∩^o^)⊃━。・*☆・*゚", "(∩^o^)⊃━☆*゚。・*・", "(∩^o^)⊃━☆・*゚・*。", "(∩^o^)⊃━。☆**・・゚", "(∩^o^)⊃━*☆゚。*・・", "(∩^o^)⊃━*゚。☆・・*", "(∩^o^)⊃━*・。・☆*゚", "(∩^o^)⊃━・。・☆*゚*", "(∩^o^)⊃━*・・*゚。☆", "(∩^o^)⊃━。*☆゚*・・", "(∩^o^)⊃━*゚・・。*☆"], ["(ノ>ω<)ノ・:’’,・・", "(ノ>ω<)ノ・゚:,★゚*", "(ノ>ω<)ノ★:・:゚:,", "(ノ>ω<)ノ*:。’゚・・", "(ノ>ω<)ノ゚。’:*:・", "(ノ>ω<)ノ・:。 ゚:・", "(ノ>ω<)ノ★::・・’’", "(ノ>ω<)ノ:☆゚・*,:", "(ノ>ω<)ノ★’: 。’:", "(ノ>ω<)ノ :*・:*’", "(ノ>ω<)ノ。:::*・゚", "(ノ>ω<)ノ・:::゚’★", "(ノ>ω<)ノ★,:。:。・", "(ノ>ω<)ノ: ,**・:", "(ノ>ω<)ノ・’’:゚::", "(ノ>ω<)ノ**。 ’::", "(ノ>ω<)ノ’:★・☆,*", "(ノ>ω<)ノ。 :,’*★", "(ノ>ω<)ノ:★:☆・・*", "(ノ>ω<)ノ・:゚’* ・"], ["(ノ◕ヮ◕)ノ゚*:・゚✧", "(ノ◕ヮ◕)ノ***:・゚", "(ノ◕ヮ◕)ノ✧:**:・", "(ノ◕ヮ◕)ノ✧✧:**:", "(ノ◕ヮ◕)ノ・゚✧:**", "(ノ◕ヮ◕)ノ・・゚✧:*", "(ノ◕ヮ◕)ノ✧✧・゚✧:", "(ノ◕ヮ◕)ノ゚゚✧・゚✧", "(ノ◕ヮ◕)ノ**゚✧・゚", "(ノ◕ヮ◕)ノ*:*゚✧・", "(ノ◕ヮ◕)ノ*・:*゚✧", "(ノ◕ヮ◕)ノ*:・:*゚", "(ノ◕ヮ◕)ノ*゚:・:*", "(ノ◕ヮ◕)ノ・・゚:・:", "(ノ◕ヮ◕)ノ:*・゚:・", "(ノ◕ヮ◕)ノ゚✧*・゚:", "(ノ◕ヮ◕)ノ・✧✧*・゚", "(ノ◕ヮ◕)ノ:・✧✧*・", "(ノ◕ヮ◕)ノ:゚・✧✧*", "(ノ◕ヮ◕)ノ✧*゚・✧✧"], - ["( ˘ ɜ˘)♫ ", "( ˘ ɜ˘)♪♫ ", "( ˘ ɜ˘)♬♪♫ ", "( ˘ ɜ˘)♩♬♪♫", "( ˘ ɜ˘)♬♩♬♪", "( ˘ ɜ˘)♩♬♩♬", "( ˘ ˘) ♪♩♬", "( ˘ ˘) ♪♩", "( ˘ ɜ˘)♬ ♪", "( ˘ ɜ˘)♩♬ ", "( ˘ ˘) ♩♬ ", "( ˘ ɜ˘)♬ ♩♬", "( ˘ ɜ˘)♪♬ ♩", "( ˘ ɜ˘)♩♪♬ ", "( ˘ ɜ˘)♪♩♪♬", "( ˘ ˘) ♪♩♪", "( ˘ ˘) ♪♩", "( ˘ ˘) ♪", "( ˘ ˘) "], + ["( ˘ ɜ˘)♫", "( ˘ ɜ˘)♪♫", "( ˘ ɜ˘)♬♪♫", "( ˘ ɜ˘)♩♬♪♫", "( ˘ ɜ˘)♬♩♬♪", "( ˘ ɜ˘)♩♬♩♬", "( ˘ ˘) ♪♩♬", "( ˘ ˘) ♪♩", "( ˘ ɜ˘)♬ ♪", "( ˘ ɜ˘)♩♬", "( ˘ ˘) ♩♬", "( ˘ ɜ˘)♬ ♩♬", "( ˘ ɜ˘)♪♬ ♩", "( ˘ ɜ˘)♩♪♬", "( ˘ ɜ˘)♪♩♪♬", "( ˘ ˘) ♪♩♪", "( ˘ ˘) ♪♩", "( ˘ ˘) ♪", "( ˘ ˘) "], ["♫♬♩◖(● o ●)◗♩♬♫", "♩♫♬◖(● o ●)◗♬♫c", "♪♪♫◖(● o ●)◗♫♪♪", "♬♩♪◖(● o ●)◗♪♩♬", "♬♩♪◖(● o ●)◗♪♩♬", "♪♪♫◖(● o ●)◗♫♪♪", "♩♫♬◖(● o ●)◗♬♫♩", "♫♬♩◖(● o ●)◗♩♬♫"], ["♫♬♩◖(⎺ ⎺)◗♩♬♫", "♩♫♬◖(⎻ ⎻)◗♬♫c", "♪♪♫◖(⎼ ⎼)◗♫♪♪", "♬♩♪◖(⎻ ⎻)◗♪♩♬", "♬♩♪◖(⎺ ⎺)◗♪♩♬", "♪♪♫◖(⎻ ⎻)◗♫♪♪", "♩♫♬◖(⎼ ⎼)◗♬♫♩", "♫♬♩◖(⎻ ⎻)◗♩♬♫"], - ["♫♬♩◖(⎺ ⎺)◗♩♬♫", "♩♫♬◖(⎺ ⎺)◗♬♫c", "♪♪♫◖(⎺ ⎺)◗♫♪♪", "♬♩♪◖(⎻ ⎻)◗♪♩♬", "♬♩♪◖(⎻ ⎻)◗♪♩♬", "♪♪♫◖(⎻ ⎻)◗♫♪♪", "♩♫♬◖(⎻ ⎻)◗♬♫♩", "♫♬♩◖(⎺ ⎺)◗♩♬♫"] + ["♫♬♩◖(⎺ ⎺)◗♩♬♫", "♩♫♬◖(⎺ ⎺)◗♬♫c", "♪♪♫◖(⎺ ⎺)◗♫♪♪", "♬♩♪◖(⎻ ⎻)◗♪♩♬", "♬♩♪◖(⎻ ⎻)◗♪♩♬", "♪♪♫◖(⎻ ⎻)◗♫♪♪", "♩♫♬◖(⎻ ⎻)◗♬♫♩", "♫♬♩◖(⎺ ⎺)◗♩♬♫"], + ["( ° °) ┳━┳ ", "( ° °) ┳━┳ ", "( ° °) ┳━┳ ", "( ° °) ┳━┳ ", "( °□°) ┳━┳ ", "( °□°) ┳━┳ ", "( °□°) ┳━┳ ", "(╯°□°)╯︵ ┻━┻ ", "(╯°□°)╯︵ ┻━┻ ", "(╯°□°)╯︵ ┻━┻ ", "(╯°□°)╯ ┻━┻ ", "(╯°□°)╯ ┻━┻ ", "(╯°□°)╯ ┻━┻ ", "( °□°) ┻━┻ ", "( °□°) ┻━┻ ", "( °□°) ┻━┻ ", "( °□°) ┻━┻ ", "( °□°) ┻━┻ ", "( °□°) ┻━┻ ", "( ° °) ┻━┻ ", "( ° °) ┻━┻ ", "( ° °) ┻━┻ ", "( ° °) ┻━┻ ", " ° °) ┻━┻ ", "° °) ┻━┻ ", " °) ┻━┻ (", "°) ┻━┻ (º", ") ┻━┻ (º ", " ┻━┻ (º _", " ┻━┻ (º _ ", " ┻━┻ (º _ º", " ┻━┻ (º _ º ", "┻━┻ (º _ º )", "┻━┻ (º _ º )", "┻━┻ (º _ º )", "┻━┻ (º _ º )", "┳━┳ノ(º _ º ) ", "┳━┳ノ(º _ º ) ", "┳━┳ノ(º _ º ) ", "┳━┳ノ(º _ º ) ", "┳━┳ (º _ º )", "┳━┳ (º _ º )", "┳━┳ (º _ º )", "┳━┳ (º _ º )", "┳━┳ (º _ º )", " ┳━┳ (º _ º ", ") ┳━┳ (º _ º", "°) ┳━┳ (º _ ", " °) ┳━┳ (º _", "° °) ┳━┳ (º ", " ° °) ┳━┳ (º", "( ° °) ┳━┳ ("] ] \ No newline at end of file