Last active
December 25, 2015 11:49
-
-
Save hynek/6972160 to your computer and use it in GitHub Desktop.
A Marked 2 custom processor that renders reST files with rst2html and leaves the rest be.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import os | |
import sys | |
import subprocess | |
ext = os.environ['MARKED_EXT'].lower() | |
if ext == 'rst': | |
print(subprocess.check_output( | |
['/usr/local/share/python/rst2html.py', | |
'--no-xml-declaration', '--stylesheet='], | |
)) | |
else: | |
print('NOCUSTOM', file=sys.stderr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment