[HN Gopher] Show HN: Simple tool for creating commandline bar ch...
___________________________________________________________________
Show HN: Simple tool for creating commandline bar charts
Author : jwmhjwmh
Score : 47 points
Date : 2021-08-28 17:00 UTC (6 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| ducktective wrote:
| Nice! There is also https://github.com/dkogan/feedgnuplot
| mihi wrote:
| Nice, this is exactly what I've been looking for for a while
| now. Especially the real-time streaming mode. Thanks for
| posting!
| xcambar wrote:
| sh for arg parsing and configuration detection (cols). awk for
| the actual work.
|
| No fluff. Straight to the point. Just Works.
|
| Congrats to the author.
| 1vuio0pswjnm7 wrote:
| "The script should work with any POSIX shell."
|
| Nice work!
| version_five wrote:
| As someone else pointed out, this definitely gets points for
| using sh/awk.
|
| Just wanted to mention that gnuplot also has a "dumb" output
| option that will generate ascii plots in the terminal. Thay is
| usually my go-to for this use case.
| teitoklien wrote:
| +1 gnuplot is awesome
|
| But this showHN project pretty cool too
| dunefox wrote:
| I would rather use this:
| https://github.com/Evizero/UnicodePlots.jl along with a little
| scripting.
| the_arun wrote:
| Anyway we could use this with realtime rendering? For eg: I pipe
| data from top command to this script to see graphs/charts change
| it dynamically?
| johnchristopher wrote:
| watch -n1 ./barchart -w 80 data
| johndough wrote:
| Slightly relevant: The program "htop" displays CPU usage with
| bars on the command line. https://htop.dev/
| jwmhjwmh wrote:
| You would probably need a wrapper script to do this. The script
| could periodically clear the screen and call "barchart" with
| the new input data, re-rendering the chart from scratch.
|
| "barchart" is a very simple shell script that doesn't do much
| on its own.
___________________________________________________________________
(page generated 2021-08-28 23:00 UTC)