Customizable Git commit punchcard visualizations
Clojure Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
src/thi/ng/punchcard
.gitignore
LICENSE
README.org
project.clj
punchcard

README.org

thi.ng/punchcard

CLI tool to create Git commit punchcard visualizations of local repos with customizable styling. SVG output via 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

git clone https://github.com/thi-ng/punchcard.git
cd punchcard

./punchcard \
  --repo <path> \
  --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 <path>

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
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 source code.

Requirements

  • Clojure 1.8
  • Leiningen

License

Copyright © 2017 Karsten Schmidt // ASL2.0 licensed