Last active
December 4, 2020 05:41
-
-
Save henrik/b950bfd7fa432eacd902 to your computer and use it in GitHub Desktop.
Super simple Elixir progress bar. Adapted from http://www.railsmine.net/2013/09/ruby-simple-progress-bar-without-ruby-gems.html.
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
IO.puts "My progress:" | |
1..100 |> Enum.each fn (i) -> | |
IO.write "\r[#{String.duplicate "=", i}] #{i} %" | |
:timer.sleep 25 | |
end | |
IO.puts "\nDone!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fleshed this out into a lib: https://github.com/henrik/progress_bar