Skip to content

Short, simple, direct scripts for creating ASCII graphical histograms in the terminal.

License

Notifications You must be signed in to change notification settings

bradfordboyle/distribution-rs

Repository files navigation

Distribution

A Rust verion of philovivero's distribution script.

Build Status Coverage Status

$ cat tests/stdin.01.txt | distribution --graph
                   Key|     Ct    (Pct) Histogram
----------------------|--------------------------------------------------------
         /etc/mateconf|7780758 (44.60%) --------------------
           /etc/brltty|3143272 (18.02%) --------
       /etc/apparmor.d|1597915  (9.16%) ----
/etc/bash_completion.d| 597836  (3.43%) --
             /etc/mono| 535352  (3.07%) --
              /etc/ssl| 465414  (2.67%) --
          /etc/ardour2| 362303  (2.08%) -
              /etc/X11| 226309  (1.30%) -
      /etc/ImageMagick| 202358  (1.16%) -
           /etc/init.d| 143281  (0.82%) -

Building

You can build the binary with

cargo build [--release]

The resulting binary will be in ./targe/[debug|release]/distribution

Testing

You can run the tests with

cargo test

Docker Image

A Dockerfile for development and coverage reporting is included. This will build a Docker image with kcov installed.

You build the development Docker images with

docker build --tag distribution-dev .

You run the development Docker image with

./scripts/run-dev.sh

Inside the development image

cargo clean
cargo test

# generate coverage repot
./scripts/coverage.sh

About

Short, simple, direct scripts for creating ASCII graphical histograms in the terminal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published