Created
December 2, 2014 20:22
-
-
Save oliviertoupin/600e29abb94f8e1acfe4 to your computer and use it in GitHub Desktop.
Rendering Markdown from github in a one liner, using only cURL and bash
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
# Rendering Markdown from github in a one liner, using only cURL and bash | |
{ echo "<style>h1 { text-align: left} </style>"; \ | |
echo "<style>"; \ | |
curl -s https://gist.githubusercontent.com/andyferra/2554919/raw/2e66cabdafe1c9a7f354aa2ebf5bc38265e638e5/github.css ; \ | |
echo "</style>"; \ | |
curl -s -H "Accept: application/vnd.github.v3" \ | |
-H "Content-Type:text/x-markdown" \ | |
-X POST --data-binary @$1 https://api.github.com/markdown/raw ; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
./produce_markdown.sh README.md > index.html
./produce_markdown.sh README.md | elinks -force-html -stdin