Simon Griffee · Time, light, movement & distance.

Pandoc ➶

26 May 2011

Universal document converter.

For example, to convert hello.html from html to markdown:

pandoc -f html -t markdown hello.html

Instead of a file, an absolute URI may be given. In this case pandoc will fetch the content using HTTP:

:::bash
pandoc -f html -t markdown http://www.fsf.org

Here’s the documentation.

There’s a Textmate bundle that works with Textmate 2, too. I needed to do the following first and then relaunch Textmate before it worked, though, otherwise I got the ‘command not found’ message when trying to use the bundle’s convert commands:

:::bash
# change to '/usr/bin' directory:

cd /usr/bin

# create symbolic link to pandoc (mine was at '/usr/local/bin/pandoc') inside '/usr/bin':

sudo ln -s `which pandoc` pandoc

What

Send