1.0.6 • Published 6 years ago

cli-cal v1.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

cli-cal

Github-like calendar graph for the command line.

Deprecated: Use cli-gh-cal instead.

This module has been created as an extract of git-stats. In the meantime (#49) Ionică Bizău created the standalone package cli-gh-cal which should be used instead of this package.

Screenshot

Installation

npm install -g cli-cal

Usage

Simply specify a list or object of entities:

echo '[["2013/07/30",2],["2013/08/31",4],["2013/11/11",3],["2014/03/01",2]]' | cli-cal

echo '{ "2013/07/30": 2, "2013/08/31": 4, "2013/11/11": 3, "2014/03/01": 2 }' | cli-cal

The given entities can be of any range and floats too. They will be normalized and mapped to five levels.

For example you can pipe clocker's output into cli-cal after some json magic:

clocker data | \
  json -a hours | \
  json -e 'this.n = [[this.date.replace(/-/g,"/"),this.hours]]' -a n | \
  json -g | \
  cli-cal

Credits

Most of the module is a generalized extract of git-stats by Ionică Bizău.