-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathact
executable file
·27 lines (25 loc) · 932 Bytes
/
act
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
#=======================================================================
# act
# File ID: 6723d974-0b9f-11e4-87ab-c80aa9e67bbd
#
# Read seconds since the Epoch from stdin and create a plot with Bézier curve
# showing how many timestamps there are per time period. Default period is one
# week, but this can be changed on the command line. See ep_day(1) for command
# line syntax.
#
# For example, to create a plot with commit activity per week in a Git
# repository:
#
# git log --format=%ct | act
#
# To create a plot from Apache logs showing daily visits:
#
# access_log2epstat access.log | act -d 1
#
# License: GNU General Public License version 2 or later.
#=======================================================================
time_str="-w 1"
test -n "$1" && time_str="$@"
tmpfile="/tmp/act.$(date -u +"%Y%m%dT%H%M%SZ").$$.tmp"
ep_day $time_str | ep >"$tmpfile"; stpl -lp -samp1000 "$tmpfile"