Created
May 1, 2022 15:25
-
-
Save Comamoca/f72ae139904688a63a7fbaaf8d82d0aa to your computer and use it in GitHub Desktop.
Nimでプログレスバー
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
import std/terminal | |
import std/[os, strutils] | |
for i in 0..100: | |
stdout.styledWriteLine(fgGreen, "▬".repeat i, if i > 50: fgGreen else: fgYellow, "\t", $i , "%") | |
sleep 42 | |
cursorUp 1 | |
eraseLine() | |
stdout.resetAttributes() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment