You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I‘m trying to pass the option --smart-quotes=yes to rst2html through restview, and I’m not sure how to do that.
I’ve tried using restview -e "rst2html --smart-quotes=yes restructuredtext.rst", thinking that --execute might be the answer, but that produces error messages (see below) and the page opened in Firefox looks like raw HTML code with rst2html error boxes with the same messages that are in the terminal output.
Output 1
Listening on http://localhost:34011/
<string>:17: (WARNING/2) Inline emphasis start-string without end-string.
<string>:23: (ERROR/3) Unexpected indentation.
<string>:21: (WARNING/2) Inline emphasis start-string without end-string.
<string>:27: (WARNING/2) Inline emphasis start-string without end-string.
<string>:28: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:31: (WARNING/2) Inline emphasis start-string without end-string.
<string>:60: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:64: (ERROR/3) Unexpected indentation.
<string>:65: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
<string>:65: (WARNING/2) Inline emphasis start-string without end-string.
<string>:76: (ERROR/3) Unexpected indentation.
<string>:83: (ERROR/3) Unexpected indentation.
<string>:89: (ERROR/3) Unexpected indentation.
<string>:100: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:100: (WARNING/2) Inline emphasis start-string without end-string.
<string>:161: (ERROR/3) Unexpected indentation.
<string>:186: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:191: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:205: (ERROR/3) Unexpected indentation.
<string>:203: (WARNING/2) Inline emphasis start-string without end-string.
<string>:207: (WARNING/2) Inline emphasis start-string without end-string.
<string>:278: (WARNING/2) Inline emphasis start-string without end-string.
<string>:308: (WARNING/2) Inline emphasis start-string without end-string.
<string>:328: (ERROR/3) Unexpected indentation.
<string>:340: (ERROR/3) Unexpected indentation.
<string>:338: (WARNING/2) Inline emphasis start-string without end-string.
I’ve also tried adding extra parameters to the command just in case, but that produced different terminal errors without any webpage that could be opened:
Listening on http://localhost:34849/
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 55218)
Traceback (most recent call last):
File "/usr/lib/python3.9/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.9/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.9/socketserver.py", line 720, in __init__
self.handle()
File "/usr/lib/python3.9/http/server.py", line 427, in handle
self.handle_one_request()
File "/usr/lib/python3.9/http/server.py", line 415, in handle_one_request
method()
File "/usr/lib/python3.9/site-packages/restview/restviewhttp.py", line 69, in do_GET
content = self.do_GET_or_HEAD()
File "/usr/lib/python3.9/site-packages/restview/restviewhttp.py", line 94, in do_GET_or_HEAD
return self.handle_command(command, watch)
File "/usr/lib/python3.9/site-packages/restview/restviewhttp.py", line 211, in handle_command
return self.handle_error(command, p.returncode, stderr, mtime=mtime)
File "/usr/lib/python3.9/site-packages/restview/restviewhttp.py", line 233, in handle_error
html = self.server.renderer.render_exception(
File "/usr/lib/python3.9/site-packages/restview/restviewhttp.py", line 528, in render_exception
source = source.decode('UTF-8', 'replace')
AttributeError: 'str' object has no attribute 'decode'
I’m using Restview v2.9.2 installed from AUR, and Python 3.9.2 with Manjaro Linux x86-64.
Any help is appreciated.
The text was updated successfully, but these errors were encountered:
Ah, sorry, no, restview doesn't use rst2html, it uses the docutils API directly. The --exec option is for specifying a command to produce the ReST source, not a command to convert ReST to HTML.
I suspect the smart quotes thing is a setting you can pass to docutils.core.publish_string() via settings_overrides maybe? Like
I‘m trying to pass the option
--smart-quotes=yes
torst2html
through restview, and I’m not sure how to do that.I’ve tried using
restview -e "rst2html --smart-quotes=yes restructuredtext.rst"
, thinking that--execute
might be the answer, but that produces error messages (see below) and the page opened in Firefox looks like raw HTML code with rst2html error boxes with the same messages that are in the terminal output.Output 1
I’ve also tried adding extra parameters to the command just in case, but that produced different terminal errors without any webpage that could be opened:
Output 2
I’m using Restview v2.9.2 installed from AUR, and Python 3.9.2 with Manjaro Linux x86-64.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: