use open qw( :std :utf8 );
use experimental qw( lexical_subs );
-our $VERSION = '1.05';
+our $VERSION = '1.06';
use Getopt::Long '2.33', qw( :config gnu_getopt );
my %opt;
" (range expected)\n"
);
},
+ 'header!',
'markers|m=s',
'graph-format=s' => sub {
$opt{'graph-format'} = substr $_[1], 0, 1;
},
'spark:s' => sub {
- $opt{spark} = [split //, $_[1] || '������▂▃▄▅▆▇█'];
+ $opt{spark} = [split //, $_[1] || '▁▂▃▄▅▆▇█'];
},
'stat|s!',
'signal-stat=s',
'unmodified|u!',
'width|w=i',
+ 'version' => sub {
+ say "barcat version $VERSION";
+ exit;
+ },
'usage|h' => sub {
local $/;
my $pod = readline *DATA;
);
}
+say(
+ color(31), sprintf('%*s', $lenval, $minval),
+ color(90), '-', color(36), '+',
+ color(32), sprintf('%*s', $size * ($maxval - $minval) - 3, $maxval),
+ color(90), '-', color(36), '+',
+ color(0),
+) if $opt{header};
+
while ($nr <= $#lines) {
$nr >= $opt{hidemax} and last if defined $opt{hidemax};
my $val = $values[$nr];
or capture the numbers itself,
for example I<-f'(\d+)'> for the first digits anywhere.
+=item --header
+
+Prepend a chart axis with minimum and maximum values labeled.
+
=item -H, --human-readable
Format values using SI unit prefixes,
=back
+=item --spark[=<glyphs>]
+
+Replace lines by I<sparklines>,
+single characters corresponding to input values.
+A specified sequence of unicode characters will be used for
+Of a specified sequence of unicode characters,
+the first one will be used for non-values,
+the last one for the maximum,
+the second (if any) for the minimum,
+and any remaining will be distributed over the range of values.
+Unspecified, block fill glyphs U+2581-2588 will be used.
+
=item -s, --stat
Total statistics after all data.