Skip to content

A CLI tool to generate bar charts in the terminal os as a HTML snippet

License

AGPL-3.0, AGPL-3.0 licenses found

Licenses found

AGPL-3.0
LICENSE
AGPL-3.0
COPYING
Notifications You must be signed in to change notification settings

Kulbartsch/bars

Repository files navigation

bars

Visualize numbers with ease! In the terminal or for web pages.

A CLI tool to generate bar charts from text input as (colored) text or HTML, written in Go.

bars follows the Unix philosophy:

Write programs that do one thing and do it well.
Write programs to work together.
Write programs to handle text streams, because that is a universal interface.

Main Features

  • Handles UTF8 characters
  • Values can be on the left or right side
  • Accept units as part of the value like 12.90$
  • Alternatively accept a comma as a decimal separator
  • Define the number of decimals to display
  • Colored terminal output
  • Optional print the sum, count and average of the given values
  • HTML output to integrate in a website or as a standalone page
  • No runtime dependencies, just one binary!
  • No compile time dependencies, just one repo!
  • Manual included

... and more to come.
Checkout the detailed features page.
So stay tuned!

Example

Displaying the disk usage as bars:

$  du -b *
60      bill.txt
237     performance.txt
115     temperatur.txt

Each input line is split up into an value and label part. By default, the output is label, value and bars:

$  du -b * | ../bars --ascii
bill.txt         60 ###############
performance.txt 237 ############################################################
temperatur.txt  115 #############################

There are parameters to accept units in the values, use a comma instead of a dot as a decimal separator and more.

See here for

License

Copyright © 2021 Alexander Kulbartsch
License AGPL-3.0-or-later (GNU Affero General Public License 3 or later)

You find a copy of the GNU Affero General Public License in this repo.
If not, see http://www.gnu.org/licenses/.

About

A CLI tool to generate bar charts in the terminal os as a HTML snippet

Resources

License

AGPL-3.0, AGPL-3.0 licenses found

Licenses found

AGPL-3.0
LICENSE
AGPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published