barcat.git
4 years agodisable markers without graph
Mischa POSLAWSKY [Wed, 4 Sep 2019 22:50:04 +0000 (00:50 +0200)]
disable markers without graph

Avoid error "Modification of non-creatable array value attempted"
trying to access unallocated positions.

4 years agocut after assumed delimiter on --trim=0
Mischa POSLAWSKY [Wed, 4 Sep 2019 22:20:35 +0000 (00:20 +0200)]
cut after assumed delimiter on --trim=0

4 years agoomit abbreviation mark on --trim=1
Mischa POSLAWSKY [Wed, 4 Sep 2019 21:55:58 +0000 (23:55 +0200)]
omit abbreviation mark on --trim=1

The first character should be whitespace or another delimiter to be kept.
Contents can be assumed cut and does not need an indicator.

4 years agoinclude value delimiter in trim length
Mischa POSLAWSKY [Wed, 4 Sep 2019 21:28:42 +0000 (23:28 +0200)]
include value delimiter in trim length

4 years agotrim maximum unless negative
Mischa POSLAWSKY [Wed, 4 Sep 2019 21:06:06 +0000 (23:06 +0200)]
trim maximum unless negative

4 years agotrim (-l) option to abbreviate contents
Mischa POSLAWSKY [Wed, 4 Sep 2019 20:36:05 +0000 (22:36 +0200)]
trim (-l) option to abbreviate contents

4 years agomarkers (-m) option to omit statistical markers
Mischa POSLAWSKY [Wed, 4 Sep 2019 20:22:01 +0000 (22:22 +0200)]
markers (-m) option to omit statistical markers

Support leaving bars untouched for either aesthetical reasons or to avoid
calculation (which may yet be(come) costly or buggy).

String argument is only checked for emptiness, otherwise all positions are
enabled.  Effectively boolean but with future compatibility for more
detailed customisation.

4 years agonegative values less than positive
Mischa POSLAWSKY [Wed, 4 Sep 2019 18:56:22 +0000 (20:56 +0200)]
negative values less than positive

Extend graph to the lowest value, with axis marked by |.

4 years agopass through numberless lines
Mischa POSLAWSKY [Wed, 4 Sep 2019 18:39:10 +0000 (20:39 +0200)]
pass through numberless lines

Ignore in statistics, and silence perl warnings about arguments not being
numeric.

4 years agofloating point value support
Mischa POSLAWSKY [Wed, 4 Sep 2019 18:29:09 +0000 (20:29 +0200)]
floating point value support

Include numbers after decimal point; perl will handle it no problem.
Replace stupid digit calculation without number reformatting by simple
string length, also fixing log error on 0 values.

4 years agonegative value support
Mischa POSLAWSKY [Wed, 4 Sep 2019 18:24:17 +0000 (20:24 +0200)]
negative value support

Include integers less than zero; treat as positive for bar sizes.

4 years agoassume standard input/output is utf8
Mischa POSLAWSKY [Wed, 4 Sep 2019 18:23:23 +0000 (20:23 +0200)]
assume standard input/output is utf8

Fixes length calculation of unicode data.

4 years agocolor option to disable formatting codes
Mischa POSLAWSKY [Wed, 4 Sep 2019 18:22:23 +0000 (20:22 +0200)]
color option to disable formatting codes

4 years agodocument practical example oneliners
Mischa POSLAWSKY [Wed, 4 Sep 2019 18:21:24 +0000 (20:21 +0200)]
document practical example oneliners

Some shell commands adapted from personal history.  After pictures,
code should also be worth quite some words.

4 years agoshort and long help options
Mischa POSLAWSKY [Thu, 5 Sep 2019 01:02:38 +0000 (03:02 +0200)]
short and long help options

Emulate git commands in having -h for usage distinct from --help for full
documentation.

4 years agominimal documentation and help options v1.00
Mischa POSLAWSKY [Wed, 4 Sep 2019 16:52:19 +0000 (18:52 +0200)]
minimal documentation and help options

4 years agoparse options to override width
Mischa POSLAWSKY [Wed, 4 Sep 2019 16:35:54 +0000 (18:35 +0200)]
parse options to override width

4 years agoindicate average value in bar
Mischa POSLAWSKY [Wed, 4 Sep 2019 14:57:08 +0000 (16:57 +0200)]
indicate average value in bar

4 years agocoloured bar markers
Mischa POSLAWSKY [Wed, 4 Sep 2019 18:22:54 +0000 (20:22 +0200)]
coloured bar markers

4 years agoprepare to facilitate other distribution markers
Mischa POSLAWSKY [Wed, 4 Sep 2019 14:55:32 +0000 (16:55 +0200)]
prepare to facilitate other distribution markers

4 years agoprepare bar positions of (mean) indicators
Mischa POSLAWSKY [Wed, 4 Sep 2019 14:45:49 +0000 (16:45 +0200)]
prepare bar positions of (mean) indicators

4 years agoindicate mean value in bar position
Mischa POSLAWSKY [Wed, 4 Sep 2019 14:22:04 +0000 (16:22 +0200)]
indicate mean value in bar position

Better visual, and accurate in case of split middle.

4 years agodistinguish median value
Mischa POSLAWSKY [Wed, 4 Sep 2019 14:12:13 +0000 (16:12 +0200)]
distinguish median value

Greater number in case of even lines.

4 years agominimum and maximum values in red and green
Mischa POSLAWSKY [Wed, 4 Sep 2019 14:10:29 +0000 (16:10 +0200)]
minimum and maximum values in red and green

4 years agoreformat and colourise numbers
Mischa POSLAWSKY [Wed, 4 Sep 2019 13:59:49 +0000 (15:59 +0200)]
reformat and colourise numbers

Replace captured values in dark grey, with minimal padding
(uniq adds at least 6 spaces we can use for graphing).

4 years agowrite out script, enable warnings
Mischa POSLAWSKY [Wed, 4 Sep 2019 13:16:23 +0000 (15:16 +0200)]
write out script, enable warnings

Mostly the same code but more readable and maintainable.
Integers are captured and bars enlarged to fill screen width.

4 years agodraw bar graph for input values v0.10
Mischa POSLAWSKY [Fri, 23 Mar 2007 15:08:59 +0000 (16:08 +0100)]
draw bar graph for input values

Written as one-liner to visualise output from uniq -c (i.e. git history).