punchcard
punchcard copied to clipboard
Customizable Git commit punchcard visualizations
- thi.ng/punchcard
CLI tool to create Git commit punchcard visualizations of local repos with customizable styling. SVG output via [[https://github.com/thi-ng/geom/blob/develop/examples/viz/demos.org#heatmap][thi.ng/geom]] heatmap viz module. Visualizations can be filtered by author (regexp) and date range.
[[./assets/example-geom.png]]
[[./assets/example-cthing.png]]
** Usage
#+BEGIN_SRC shell git clone https://github.com/thi-ng/punchcard.git cd punchcard
./punchcard
--repo
--author "email-regexp"
--title "Diagram title"
--gradient "yellow-green-blue"
--ramp 0.66
--reverse 1
--from "2017-01-01 00:00"
--to "2018-01-1 00:00"
--bg black
--fg white
--out
*** Options
- --repo :: The only required argument. Repository path.
- --author :: Optional author email regexp. If given, must be in quotes and visualization will only consider commits by authors matching the expression. E.g. =.*@gmail.com= will only match contributions from gmail addresses.
- --from :: Optional start date in =YYYY-mm-dd hh:MM= format (inclusive)
- --to :: Optional end date in =YYYY-mm-dd hh:MM= format (exclusive, open interval)
- --gradient :: [[https://github.com/thi-ng/color/blob/master/src/gradients.org][thi.ng/color]] gradient preset ID. Default: =yellow-green-blue=
- --ramp :: gradient ramp exponent (default: 1), if < 1 gradient will emphasize smaller values in the heatmap, if > 1 larger values
- --reverse :: if given as =--reverse 1= will reverse gradient direction
- --out :: Output path. Default: =punchcard.svg=
- --title :: Optional title / headline string. Defaults to repo path
- --bg :: valid CSS color string for background (default: transparent)
- --fg :: valid CSS color string for text/axes (default: black)
Further layout & styling options are available via the =layout= map in the [[https://github.com/thi-ng/punchcard/blob/master/src/thi/ng/punchcard/core.clj#L15][source code]].
** Requirements
- Clojure 1.8
- Leiningen
** License
Copyright © 2017 Karsten Schmidt // ASL2.0 licensed