Last active
October 8, 2021 01:35
-
-
Save retronym/7f4d10decf099535f8997c0f748dda28 to your computer and use it in GitHub Desktop.
Render the body of a GitHub issue in a local HTML file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --silent --fail https://raw.githubusercontent.com/sindresorhus/github-markdown-css/gh-pages/github-markdown.css > /tmp/gh.css && ( | |
echo '<html><head><link rel="stylesheet" href="/tmp/gh.css"/><style>@page { size: A4 landscape; }</style> | |
</head><body><div class="markdown-body">' && \ | |
gh api repos/lightbend/scala-team/issues/188 -t '{{.body}}' | | |
gh api --field text=@- /markdown && \ | |
echo '</div></body></html>' \ | |
) > /tmp/out.html | |
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-gpu --headless --print-to-pdf-no-header --print-to-pdf=/tmp/out.pdf /tmp/out.html | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment