replace perl in example date parsing
[barcat.git] / barcat
diff --git a/barcat b/barcat
index 723c7da3a3f6e4d0045b41413ef9e06f1d2cc87d..c2f41aa97c9365debb63be1ebdfd8d3b5003d19d 100755 (executable)
--- a/barcat
+++ b/barcat
@@ -77,7 +77,10 @@ if (defined $opt{interval}) {
        } or warn $@, "Expect slowdown with large datasets!\n";
 }
 
-$SIG{INT} = 'IGNORE';  # continue after assumed eof
+$SIG{INT} = sub {
+       $SIG{INT} = 'DEFAULT';  # reset for subsequent attempts
+       'IGNORE' # continue after assumed eof
+};
 
 my $valmatch = qr/$opt{anchor} ( \h* -? [0-9]* \.? [0-9]+ (?: e[+-]?[0-9]+ )? |)/x;
 while (readline) {
@@ -386,6 +389,12 @@ Or the top 3 most frequent authors with statistics over all:
 
     git shortlog -sn | barcat -L3 -s
 
+Activity of the last days:
+
+    ( git log --pretty=%ci --since=30day | cut -b-10
+      seq 0 30 | xargs -i date +%F -d-{}day ) |
+    sort | uniq -c | awk '$1--' | graph
+
 =head1 AUTHOR
 
 Mischa POSLAWSKY <perl@shiar.org>