git-stats icon indicating copy to clipboard operation
git-stats copied to clipboard

Documentation: CLI image generation oneliner

Open sgregson opened this issue 7 years ago • 4 comments

I don't know if this is worth documenting, but I was playing with the CLI referenced using pageres and came up with a fun little ("little" 😜 ) one-liner:

TMP=$(mktemp)".html";OUT=gitstats-"$(date '+%Y-%m-%d')".png;rm $OUT && git-stats --raw | git-stats-html -o $TMP && pageres $TMP 775x250 --filename="gitstats-<%=date%>" && imgcat $OUT

Aside from a little tempfile and date manipulation to render only the final file into "~/Downloads", it depends on https://github.com/eddieantonio/imgcat to render the image into terminal.

imgcat_for_cli

great work with all these tools!

sgregson avatar Jun 20 '17 19:06 sgregson

That's so neat! ✨ Documenting it would be so cool!

What terminal emulator are you using? I guess not all support images.

IonicaBizau avatar Jun 21 '17 06:06 IonicaBizau

Is there documentation for this now?

MattMarquise avatar Oct 06 '20 14:10 MattMarquise

Not really, this can be added in this section as a TLDR, maybe:

https://github.com/IonicaBizau/git-stats#saving-the-data-as-html-and-images

IonicaBizau avatar Oct 06 '20 14:10 IonicaBizau

Hello,@IonicaBizau I would like to take this documentation task . Let me if I can work on this. What exactly would you like to be added in the document only the code or the image of the execution ..?

ShabanaNaik avatar Oct 29 '22 05:10 ShabanaNaik