Skip to content

Documentation: CLI image generation oneliner #122

Description

@sgregson

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!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions