[Django]-How to render .rst files in a markdown or html format?

40πŸ‘

.rst files are ReStructuredText format. They look like text files, but can be rendered into HTML with the Python docutils package.

πŸ‘€Mike DeSimone

25πŸ‘

As zjk says, you can use restview:

restview is available from the Python Package Index: http://pypi.python.org/pypi/restview. You can also pip install restview.

Here is what I did to test it out using a virtual environment:

mkdir restview
cd restview/
virtualenv-2.7 venv   # The second system I used just used 'virtualenv venv'
./venv/bin/pip install restview
./venv/bin/restview ~/path/MANUAL.rst 

This launched a web server and opened the documentation page in my browser.

Note: I only used virtualenv because I don’t like installing things globally. It may be overkill for many others, but I also have better luck with these one-off environemnets. When I tried pip install restview on an Ubuntu 14.04 VM it failed, whereas the approach above worked like a charm for me on that system as well as this one.

πŸ‘€sage

11πŸ‘

Try restview

πŸ‘€zjk

Leave a comment