joeyespo/grip — pull request #11 by isbadawi (2013-03-27 23:20:39+00:00)
Title: Offline rendering

This is intended to address #4.

I've added support for offline rendering using `misaka` and `Pygments`, enabled by the `--render-offline` flag. (I didn't use `Flask-Misaka`; it didn't seem to be adding much).

Some notes / requests for comments:
* The `--gfm` and `--context` flags are silently ignored for offline rendering. What should be done here? Could try and implement that functionality locally, or maybe just emit a warning?
* My main interest is making it work without a network connection (as opposed to e.g. improving response time), so I also made it so that retrieved styles are cached and served locally. This makes the first request a bit slower.
* There's nothing that clears the cache; I wasn't sure what the right thing to do was here.