git.shiar.nl
/
barcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4644846
)
unclean (-u) option to keep leading whitespace
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 5 Sep 2019 20:07:49 +0000
(22:07 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 5 Sep 2019 21:56:49 +0000
(23:56 +0200)
graph
patch
|
blob
|
history
diff --git
a/graph
b/graph
index ab51d0877dc49ac9517161ed92ddd7b7427450a2..8eb0493476a48d9d1301fa59d75ab48fff28d924 100755
(executable)
--- a/
graph
+++ b/
graph
@@
-17,6
+17,7
@@
GetOptions(\my %opt,
'follow|f:i',
'trim|length|l=i',
'markers|m=s',
'follow|f:i',
'trim|length|l=i',
'markers|m=s',
+ 'unclean|u!',
'width|w=i',
'usage|h' => sub { podexit() },
'help' => sub { podexit(-verbose => 2) },
'width|w=i',
'usage|h' => sub { podexit() },
'help' => sub { podexit(-verbose => 2) },
@@
-39,7
+40,8
@@
$SIG{INT} = 'IGNORE'; # continue after assumed eof
my (@lines, @values);
while (readline) {
chomp;
my (@lines, @values);
while (readline) {
chomp;
- push @values, s/^\h* ( -? [0-9]* (?:\.[0-9]+)? )//x && $1;
+ s/^\h*// unless $opt{unclean};
+ push @values, s/^ ( \h* -? [0-9]* \.? [0-9]+ |)//x && $1;
if (defined $opt{trim}) {
my $trimpos = abs $opt{trim};
if ($trimpos <= 1) {
if (defined $opt{trim}) {
my $trimpos = abs $opt{trim};
if ($trimpos <= 1) {
@@
-183,6
+185,8
@@
or 68% of all entries.
=back
=back
+=item -u, --unclean
+
=item -w, --width=<columns>
Override the maximum number of columns to use.
=item -w, --width=<columns>
Override the maximum number of columns to use.
@@
-217,7
+221,7
@@
Number of HTTP requests per day:
Any kind of database query with leading counts:
echo 'SELECT count(*),schemaname FROM pg_tables GROUP BY 2' |
Any kind of database query with leading counts:
echo 'SELECT count(*),schemaname FROM pg_tables GROUP BY 2' |
- psql -t | graph
+ psql -t | graph
-u
Git statistics, such commit count by year:
Git statistics, such commit count by year: