https://github.com/lurst/vspark
:bar_chart: Like spark, but vertical
https://github.com/lurst/vspark
cli
Last synced: 10 months ago
JSON representation
:bar_chart: Like spark, but vertical
- Host: GitHub
- URL: https://github.com/lurst/vspark
- Owner: LuRsT
- Created: 2013-02-15T20:37:30.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2016-05-13T07:59:14.000Z (over 9 years ago)
- Last Synced: 2025-03-18T03:22:26.808Z (10 months ago)
- Topics: cli
- Language: Perl
- Homepage:
- Size: 11.7 KB
- Stars: 35
- Watchers: 4
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
vspark
======
Create utf8 or ascii vertical graphs with ease.
## Setup
$ curl https://raw.githubusercontent.com/LuRsT/vspark/master/vspark > ~/bin/vspark
(Examine ~/bin/vspark)
$ chmod +x ~/bin/vspark
## How to use
With a set of numbers:
$ vspark 1 20 400 300 200
▏
▏
█
▊
▌
or via STDIN:
$ seq 0 10 | sort -R | vspark
▏
▌
▍
▊
█
▎
▉
▋
▍
▏
▋
You can also choose how many columns do you want the graph to spread out, by changing the `GRAPH\_SIZE` env variable:
$ seq 10 | GRAPH_SIZE=10 vspark
█▏
██▏
███▏
████▏
█████▏
██████▏
███████▏
████████▏
█████████▏
██████████▏
And if it strikes your fancy, you can display the numbers next to each bar, by
using `DISPLAY\_NUMBERS` env variable (just needs to have some value in it):
$ seq 10 | GRAPH_SIZE=10 DISPLAY_NUMBERS=1 vspark
1 █
2 █▉
3 ██▊
4 ███▋
5 ████▋
6 █████▌
7 ██████▍
8 ███████▎
9 ████████▏
10 █████████▏
You can also have ASCII output using `CUSTOM_CHAR`:
$ seq 10 | GRAPH_SIZE=5 CUSTOM_CHAR="=" vspark
=
=
==
==
===
===
===
====
====
=====
## Licence
The MIT License (MIT)