View Single Post
Old 05-07-2011, 04:40 PM   #13
Little Frank
Junior Member
Little Frank began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2011
Device: nook, Nokia N800 with FBreader
Thanks!


Thank YOU! This works!
Ptotal = ['--output-profile ', 'nook ', \
'--level1-toc ', '//h:h2 ', \
'--level2-toc ', '//h:h4 ', \
'--max-toc-links ', '0 ', \
'--smarten-punctuation ', \
'--change-justification ', 'left ', \
'--pretty-print ', \
'--preserve-cover-aspect-ratio ', \
'--enable-heuristics ', \
'--rating ', '4 ', \
'--author-sort ', 'Eusebius_of_Caesarea ', \
'--cover ', 'eu.jpg']

subprocess.check_call(['ebook-convert', sys.argv[1], sys.argv[2], Ptotal])


(Except for the 'rating' and 'author-sort'; I can work around those)
I love Calibre!
(And I indent my code; don't know what happened with the example I pasted in here.)
Little Frank is offline   Reply With Quote