Created
April 26, 2012 23:14
-
-
Save bzerangue/2504041 to your computer and use it in GitHub Desktop.
RECURSIVELY Bash convert all your html to markdown files (with Pandoc)
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
find . -name "*.ht*" | while read i; do pandoc -f html -t markdown "$i" -o "${i%.*}.md"; done |
This is great! Thank you.
Is there an adjustment to make it convert HTML tables to Markdown tables?
@OldManUmby - after doing a web search, it looks you can do it through their pipe_tables
extension.
https://pandoc.org/chunkedhtml-demo/8.9-tables.html#extension-pipe_tables
You need to look into how to set that extension up. I am not sure how it works. I did this little one-liner 13 years ago, and I am not sure how the Pandoc software has changed since then.
find . -name "*.ht*" | while read i; do
pandoc -f html -t markdown+pipe_tables "$i" -o "${i%.*}.md";
done
Yep, that's what I found, too. THX!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you! Helped me to convert multiple folders of .md files to .docx and saved a lot of time