Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hejsil/sab
cli command-line-tool zig
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hejsil/sab
- Owner: Hejsil
- License: mit
- Created: 2019-01-04T13:23:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-22T12:18:25.000Z (9 months ago)
- Last Synced: 2024-05-02T02:55:58.864Z (9 months ago)
- Topics: cli, command-line-tool, zig
- Language: Zig
- Homepage:
- Size: 46.9 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# sab (Spinners And Bars)
A simple program for printing spinners and bars to stdout.
```
Usage: sab [OPTION]...
sab will draw bars/spinners based on the values piped in through
stdin.To draw a simple bar, simply pipe a value between 0-100 into sab:
echo 35 | sab
====You can customize your bar with the '-s, --steps' option:
echo 35 | sab -s ' ,-,='
===-`sab` has two ways of drawing bars, which can be chosen with the `-t, --type` option:
echo 50 | sab -s ' ,|,='
=====
echo 55 | sab -s ' ,|,='
=====|
echo 50 | sab -s ' ,|,=' -t mark-center
====|
echo 55 | sab -s ' ,|,=' -t mark-center
=====|To draw a simple spinner, simply set the length of the bar to 1
and set max to be the last step:
echo 2 | sab -l 1 -M 3 -s '/,-,\,|'
\sab will draw multible lines, one for each line piped into it.
echo -e '0\n1\n2\n3' | sab -l 1 -M 3 -s '/,-,\,|'
/
-
\
|Options:
-h, --help print this message to stdout
-l, --length the length of the bar (default: 10)
-m, --min minimum value (default: 0)
-M, --max maximum value (default: 100)
-s, --steps a comma separated list of the steps used to draw the bar (default: ' ,=')
-t, --type the type of bar to draw (default: normal)
```