Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: CLI image generation oneliner #122

Open
sgregson opened this issue Jun 20, 2017 · 4 comments
Open

Documentation: CLI image generation oneliner #122

sgregson opened this issue Jun 20, 2017 · 4 comments

Comments

@sgregson
Copy link

sgregson commented Jun 20, 2017

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!

@IonicaBizau
Copy link
Owner

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

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

@MattMarquise
Copy link

Is there documentation for this now?

@IonicaBizau
Copy link
Owner

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

@ShabanaNaik
Copy link

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 ..?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants