a quick utility that opens markdown files in the browser
This is a quick utility that lets you open markdown files in your default web browser:
First you need markdown2:
$ sudo pip install markdown2
then just run sudo python setup.py install
from the source directory.
to open a markdown file in your default browser, just do:
$ denmark readme.md
I've only tested this on ubuntu 11.04.
First, you need to create an Overrides.xml file in the mime/packages directory (if you already have an Overrides.xml, you'll have to copy the entry in instead):
$ sudo cat markdown.xml > /usr/share/mime/packages/Overrides.xml
And update the mimetypes database:
$ sudo update-mime-database /usr/share/mime
Finally, add a line in your defaults file (again, may differ based on distro):
$ sudo echo "text/x-web-markdown=denmark.desktop" >> /etc/gnome/defaults.list
You'll probably need to re-open nautilus before the changes will take hold, but then you should be able to double click markdown files to open them.