-
-
Save Yardanico/343154579666a62a82336385fd491737 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example of the usage, async is here just for fun | |
import asyncdispatch | |
var spinner1 = newSpinny("Loading file..".fgWhite, Dots, time = true) | |
spinner1.setSymbolColor(colorize.fgBlue) | |
spinner1.start() | |
proc test {.async.} = | |
await sleepAsync(3000) | |
waitFor test() | |
spinner1.success("File was loaded successfully.") | |
var spinner2 = newSpinny("Downloading files..".fgBlue, Dots5) | |
spinner2.setSymbolColor(fgLightBlue) | |
spinner2.start() | |
# do some work here | |
for x in countup(5, 10): | |
sleep(500) | |
spinner2.error("Sorry, something went wrong during downloading!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment