
Git-cal - GitHub Activity Calendar for your Terminal - X4
https://github.com/k4rthik/git-cal
======
binarymax
Awesome! Running _$tput colors_ will tell you if you have 256 or not (mine
shows 8). I am on ubuntu and found a tutorial to upgrade - will give it a try
just so I can run this.

Slightly off-topic, I had some fun with tput about a month ago here:
[http://max.io/bash.html](http://max.io/bash.html) ...but it only supports 8
colors. Maybe I can upgrade with this new knowledge. Thank you!

~~~
LeonidasXIV
I just did "export TERM=xterm-256color" in my gnome-terminal 3.8.4 which made
"tput colors" return 256 and the script worked.

------
contingencies
Cute project. The fundamental problem remaining is that proper participation
on Github seems to still require a web browser.

If you could figure out how to get the rest of its functionality working well
on the command line (discussions, etc.) without resorting to unnavigable
_links_ sessions, then it'd be a still funkier achievement.

I'm surprised they haven't done this themselves, to be honest.

~~~
sharyanto
The script works on any git repo. It's just that the graphs being produced are
similar to those found on Github. Aside from that, the script is not related
to Github at all.

~~~
k4rthik
Yes, the title is slightly misleading and different from the project title
"github like contributions calendar on terminal". Adding github support (just
to view the same graph on terminal rather than firing the web page for it) is
one of the suggestions and is in TODO list.

------
breckinloggins
Looks great!

> assumes the terminal is 256 colors

Would there be a way to degrade gracefully somehow if not? Perhaps using
grayscale?

~~~
k4rthik
Thank you. [https://github.com/k4rthik/git-
cal/commit/2c6b50b57fa818d943...](https://github.com/k4rthik/git-
cal/commit/2c6b50b57fa818d943ccf4232ead37d866273af5) should solve it partially
(exit(1) if tput colors < 256)

~~~
solox3
Weird, because before this check was introduced this morning, Konsole reported
8 colours, but rendered your git-cal correctly, using more than 8.

~~~
__david__
Konsole may support more than 8 colors but if your TERM environment is set
wrong then the OS won't know it can. If you bypass the OS and print the color
escape sequences directly (as the script is doing, naughtily[1]) then it might
just work.

[1] The proper way is to use terminfo to output the escape sequences for you.
See
[http://perldoc.perl.org/Term/Cap.html](http://perldoc.perl.org/Term/Cap.html)
for how to do this with standard Perl. EDIT: I can't get this to work—Seems
Perl has poor terminfo support. :-( "tput setaf 10" is the correct way from
sh.

------
chankey_pathak
Awesome! +1 for using Perl :)

------
jpinkerton88
i love this

