progredient 1.1.0

A program to render text progress bars.
Documentation
  • Coverage
  • 0%
    0 out of 21 items documented0 out of 6 items with examples
  • Size
  • Source code size: 10.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.73 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • fabjan/progredient
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • fabjan

progredient

Crate Build Status MIT Licensed

Just a program wrapping the nice and simple dominicparga/progressing for direct use in scripts etc.

Installing

$ cargo install progredient

Usage

Usage:
progredient --at X%
progredient --at Y --from X --to Z

Optional arguments:
--length L        stretch the bar to be this number of chars long
--style ABCDE     render the bar as "ABBBBBBCDDDE" with C positioned at --at
--label LABEL     show this text after the bar
--left            show the label before the bar instead
--no-newline      do not print a newline after the bar

Examples

Glance at your disk usage:

$ df | grep disk | while read label blocks used available capacity rest; do progredient --at $capacity --label $label --style '[|| ]' ; done
[||||              ] /dev/disk1s5s1
[|                 ] /dev/disk1s4
[|                 ] /dev/disk1s2
[|                 ] /dev/disk1s6
[||||||||||||||    ] /dev/disk1s1

Track your workday:

$ to_seconds() { gdate -d "1970-01-01 UTC $1" +%s }
$ progredient --at $(to_seconds $(gdate +%T)) --from $(to_seconds 08:00) --to $(to_seconds 17:00) --style "--O--"
------------O-------

Check your battery:

$ progredient --at $(pmset -g batt | grep -o '[0-9]*%') --style '()) }'
()))))))))))))))   }