QLRest is a simple QuickLook generator for reStructuredText files. It renders a preview of the selected ReST file using Python, Docutils and Pygments.
If you work on reST (reStructuredText) documents, you might find it frustrating to manually convert them to HTML, PDF or some other format just to see what they'll look like. QuickLook on the Mac provides a way to avoid this frustration.
This software has a lineage. Highlights of which are:
- Phillip Toland (toland) originally created the qlmarkdown project to provide a QuickLook plugin for Markdown files.
- Idan Gazit (idan) adapted qlmarkdown to his qlrest project to provide the same capability for reStructureText files.
- Dave Abrahams (dabrahams) forked Idan's qlrest project to make it work in new versions of OSX.
- I forked Dave's qlrest project to add nicer styling and code block syntax highlighting to provide a view nearly identical to how GitHub renders reStructuredText files.
What do the QuickLook previews look like?
Valid reStructuredText with syntax highlighting on a .. code:: python
block.
Invalid reStructuredText.
Install Python package dependencies.
QLRest requires that docutils and pygments be installed and on the PYTHONPATH of your default python installation. If docutils and pygments cannot be found, or if another error arises during the rendering process, qlrest will fall back to plain-text previews.
pip install -U docutils pip install -U pygments
Copy QLRest.qlgenerator to ~/Library/QuickLook or /Library/QuickLook.
Reload QuickLook. This probably isn't necessary.
qlmanage -r
To uninstall, drag QLRest.qlgenerator into the trash.
Source code is available at http://github.com/cluther/qlrest.
The QLRest code is distributed under the terms in the file LICENSE.txt. See notes on lineage of authorship in the introduction second of this README.
- Added GitHub reST styling including Pygments syntax highlighting support.
- Initial release. "Alpha Quality" -- use at your own risk!