Created
June 24, 2014 22:12
-
-
Save zombiecalypse/fae99cb1537f6027f163 to your computer and use it in GitHub Desktop.
Editing Google Docs locally as markdown with vim
This file contains hidden or 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/sh | |
# Use as google docs edit --title "Reviews Regex Parse" --editor vim-html-markdown --format htm | |
file=$1 | |
markdown=`tempfile --suffix=.mdown` | |
# Convert to markdown with pandocs | |
pandoc "$file" -f html -t markdown -o $markdown | |
# Edit the markdown file | |
vim $markdown | |
# And convert it back to html, which can be uploaded to Google Docs | |
pandoc $markdown -f markdown -t html -o "$file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment