Sublime Text 2&3 plugin to live preview markup files, supported (not limited to) markup formats are markdown, reStructuredText, WikiCreole and textile.
There is no docutils module in the default python3.3.zip. used the python3.3 command to install it yourself and move the docutils module into python3.3.zip.
If you want to preview md file, you can remove "strikeout", "subscript", "superscript". Or see: #85 .
Version of OmniMarkupPreviewer: v3.0.0.
Version of docutils: 0.10, if you are 0.14, see: Temporary repair methods -> step 1.
I get the following error in the browser:
Error: 404 Not Found
Sorry, the requested URL 'http://127.0.0.1:51005/view/27' caused an error:
'buffer_id(27) is not valid (closed or unsupported file format)'
**NOTE:** If you run multiple instances of Sublime Text, you may want to adjust
the `server_port` option in order to get this plugin work again.
This is what I see in the console:
Traceback (most recent call last):
File "/opt/sublime_text/Data/Packages/OmniMarkupPreviewer/OmniMarkupLib/RendererManager.py", line 266, in render_text
rendered_text = renderer.render(text, filename=filename)
File "/opt/sublime_text/Data/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/RstRenderer.py", line 51, in render
text, writer=writer, settings_overrides=settings_overrides
File "/opt/sublime_text/python3.3.zip/docutils/core.py", line 448, in publish_parts
enable_exit_status=enable_exit_status)
File "/opt/sublime_text/python3.3.zip/docutils/core.py", line 662, in publish_programmatically
output = pub.publish(enable_exit_status=enable_exit_status)
File "/opt/sublime_text/python3.3.zip/docutils/core.py", line 219, in publish
output = self.writer.write(self.document, self.destination)
File "/opt/sublime_text/python3.3.zip/docutils/writers/__init__.py", line 80, in write
self.translate()
File "/opt/sublime_text/python3.3.zip/docutils/writers/html4css1/__init__.py", line 176, in translate
self.output = self.apply_template()
File "/opt/sublime_text/python3.3.zip/docutils/writers/html4css1/__init__.py", line 185, in apply_template
template_file = open(self.document.settings.template, 'rb')
NotADirectoryError: [Errno 20] Not a directory: '/opt/sublime_text/python3.3.zip/docutils/writers/html4css1/template.txt'
Temporary repair methods are as follows:
Make sure docutils 0.10 exists in python3.3.zip.
If you are using docutils 0.14 , you must modify Writer.default_stylesheet in OmniMarkupPreviewer/OmniMarkupLib/Renderers/RstRenderer.py to Writer.default_stylesheets[0].
cp docutils/writers/html4css1/template.txt to /path/to/the/file/template.txt.
Modify the code in docutils/writers/html4css1/__init__.py(about 178 lines, function: apply_template) to:
PS:
docutils
module in the defaultpython3.3.zip
. used thepython3.3
command to install it yourself and move thedocutils
module intopython3.3.zip
.md
file, you can remove "strikeout", "subscript", "superscript". Or see: #85 .v3.0.0
.0.10
, if you are0.14
, see:Temporary repair methods
->step 1
.I get the following error in the browser:
This is what I see in the console:
Temporary repair methods are as follows:
docutils 0.10
exists inpython3.3.zip
. If you are usingdocutils 0.14
, you must modifyWriter.default_stylesheet
inOmniMarkupPreviewer/OmniMarkupLib/Renderers/RstRenderer.py
toWriter.default_stylesheets[0]
.docutils/writers/html4css1/template.txt
to/path/to/the/file/template.txt
.docutils/writers/html4css1/__init__.py
(about 178 lines, function:apply_template
) to:OK, you can preview RST file in browser.