Open clach04 opened 12 years ago
Do the slides in doc/intro.rst work for you? I've never had a first slide without text in the body. Probably would be easy to patch so it works.
Actually that fails miserably, it looks like it requires pygments in that test case:
E:\svn\rst2odp>rst2odp.py doc\intro.rst --traceback
Could not import pygments code highlighting will not work
Traceback (most recent call last):
File "E:\svn\rst2odp\rst2odp.py", line 992, in ?
sys.exit(main(sys.argv) or 0)
File "E:\svn\rst2odp\rst2odp.py", line 979, in main
enable_exit_status=enable_exit_status)
File "E:\svn\docutils\docutils\core.py", line 223, in publish
output = self.writer.write(self.document, self.destination)
File "E:\svn\docutils\docutils\writers\__init__.py", line 77, in write
self.translate()
File "E:\svn\rst2odp\rst2odp.py", line 124, in translate
self.document.walkabout(self.visitor)
File "E:\svn\docutils\docutils\nodes.py", line 173, in walkabout
if child.walkabout(visitor):
File "E:\svn\docutils\docutils\nodes.py", line 173, in walkabout
if child.walkabout(visitor):
File "E:\svn\docutils\docutils\nodes.py", line 165, in walkabout
visitor.dispatch_visit(self)
File "E:\svn\rst2odp\rst2odp.py", line 181, in dispatch_visit
nodes.GenericNodeVisitor.dispatch_visit(self, node)
File "E:\svn\docutils\docutils\nodes.py", line 1611, in dispatch_visit
return method(node)
File "E:\svn\rst2odp\rst2odp.py", line 722, in visit_literal_block
self.cur_slide.add_code(node_input, language)
File "E:\svn\rst2odp\odplib\preso.py", line 631, in add_code
output = pygments.highlight(code, lexers.get_lexer_by_name(language, stripall=True),
NameError: global name 'pygments' is not defined
Again, I always have pygments installed:) Feel free to create a pull request for handling missing pygments.
Can you try again with the code slide deleted?
Removing the code avoids the pygments issue :-) I'll send you something for that one soon.
...but I still get a corrupted odp. I just saw a bunch of file opens in character mode (for read, the writes are binary). That may be it..... Have you done any testing with Windows (or wine and the win32 cpython)? Or reports from win users? I may be the first one
No, there was a patch a few months back see #7
The pygments issue (not really relevant to this issue but came up as part of the discussion) has been hacked in my fork/branch https://github.com/clach04/rst2odp/commits/master - I've not yet made a pull request to get a feel for what you would expect the behavior to be.
I'm guessing the preferred behavior would be code without syntax highlighting (I've not yet worked out how to deal with that in docutils).
This file:
Will fail with: