To install Markdown's extensions by Python
I like to setup a virtualenv
when I use python for any sort of project. So on debian based systems I install pip
and virtualenv
sudo aptitude install python-pip python-virtualenv
Then if using python markdown, I would make my virtual environment and use pip
to install python-markdown
and ElementTree
virtualenv mynewbook
pip -E mynewbook install -U Markdown ElementTree
To make life easier I usually set my environment to the local virtual environment after changing to the new project directory
cd mynewbook
source bin/activate
Then with my book in the file mybook.markdown with the format
[TOC]
Heading-a
==========
---text---
Heading-b
------------
I just have to run
markdown mybook.markdown -f mybook.html -x toc
When you're done with your virtual environment it's as simple as typing
deactivate