Skip to content

Instantly share code, notes, and snippets.

@oliviertoupin
Created December 2, 2014 20:22
Show Gist options
  • Save oliviertoupin/600e29abb94f8e1acfe4 to your computer and use it in GitHub Desktop.
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
# 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 ; }
@oliviertoupin
Copy link
Author

./produce_markdown.sh README.md > index.html
./produce_markdown.sh README.md | elinks -force-html -stdin

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