Skip to content
/ qlrest Public
forked from dabrahams/qlrest

QuickLook render plugin for ReST (ReStructuredText) files.

License

Notifications You must be signed in to change notification settings

cluther/qlrest

 
 

Repository files navigation

QLRest

Introduction

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:

  1. Phillip Toland (toland) originally created the qlmarkdown project to provide a QuickLook plugin for Markdown files.
  2. Idan Gazit (idan) adapted qlmarkdown to his qlrest project to provide the same capability for reStructureText files.
  3. Dave Abrahams (dabrahams) forked Idan's qlrest project to make it work in new versions of OSX.
  4. 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.

Screenshots

What do the QuickLook previews look like?

Valid reStructuredText with syntax highlighting on a .. code:: python block.

https://lh6.googleusercontent.com/rcaqpqHR8gueABZA3P_dwdNkb1rppobhlbZc-9tzDOe9kKPSgDyQx-dqt1V3Rg9uUDfe2JvT2RI

Invalid reStructuredText.

https://lh3.googleusercontent.com/All_lvK2rbpAzC6TO42aoUsWcQ_95Ur7JIPdMgZ1Bbm_1AkWUvEyVs6rGVGmOWQSv3BZWI5ahFU

Installation

  1. 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
  2. Copy QLRest.qlgenerator to ~/Library/QuickLook or /Library/QuickLook.

  3. Reload QuickLook. This probably isn't necessary.

    qlmanage -r

To uninstall, drag QLRest.qlgenerator into the trash.

Source Code

Source code is available at http://github.com/cluther/qlrest.

License

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.

Change Log

Version 2.0.0 - Aug 10th 2012

  • Added GitHub reST styling including Pygments syntax highlighting support.

Version 0.1 - Feb 23rd 2009

  • Initial release. "Alpha Quality" -- use at your own risk!

About

QuickLook render plugin for ReST (ReStructuredText) files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 51.2%
  • Objective-C 48.8%