View Single Post
Old 05-09-2011, 11:05 AM   #1
Reevrom
Junior Member
Reevrom began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: iPhone+Stanza
Markdown Issues. Any suggestions?

So I'm trying to convert files into markdown formatted txt files and I keep running into issues.

More often than not, converting directly from an ePub (with or without DRM) will hit a snag and throw this error:

Code:
Converting XHTML to Markdown formatted TXT...
Python function terminated unexpectedly
  string index out of range (Error Code: 1)
Traceback (most recent call last):
  File "site.py", line 103, in main
  File "site.py", line 85, in run_entry_point
  File "site-packages\calibre\ebooks\conversion\cli.py", line 282, in main
  File "site-packages\calibre\ebooks\conversion\plumber.py", line 1040, in run
  File "site-packages\calibre\ebooks\txt\output.py", line 81, in convert
  File "site-packages\calibre\ebooks\txt\markdownml.py", line 27, in extract_con
tent
  File "site-packages\calibre\ebooks\txt\markdownml.py", line 52, in mlize_spine

IndexError: string index out of range
So I tried converting to .mobi first and then into markdown. Although it didn't throw an error, the formatting isn't converted from .mobi into .txt.

Finally I tried to convert to .pdf and then to markdown. It doesn't throw an error, converts the formatting but it commonly has the ol' 'double L' bug.

If you can think of any other way for me to convert to markdown formatted txt from .epub I'd love to hear it.
Reevrom is offline   Reply With Quote