Skip to content

Commit

Permalink
add ascii theme from #203
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Oct 3, 2024
1 parent 0e8db3d commit 787de03
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions examples/theme-ascii/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package main

import (
"time"

"github.com/schollz/progressbar/v3"
)

func main() {
bar := progressbar.NewOptions(100,
progressbar.OptionUseANSICodes(false),
progressbar.OptionEnableColorCodes(true),
progressbar.OptionShowIts(),
progressbar.OptionSetTheme(progressbar.ThemeASCII),
progressbar.OptionShowElapsedTimeOnFinish(),
)

for i := 0; i < 100; i++ {
bar.Add(1)
time.Sleep(40 * time.Millisecond)
}
}

0 comments on commit 787de03

Please sign in to comment.