-
-
Save kentbye/6b81372dedccbc8a7a5b to your computer and use it in GitHub Desktop.
Convert Markdown file to HTML and copy into copy buffer from the command line
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
#!/bin/bash | |
FULLFILE=$1; | |
FILE="${FULLFILE%%.*}"; | |
# Convert markdown to html | |
echo "converting $FILE.md to $FILE.html"; | |
`pandoc -i $FILE.md -o $FILE.html`; | |
echo "copying HTML into copy buffer"; | |
`cat $FILE.html | pbcopy`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment