View Single Post
Old 07-06-2010, 02:57 PM   #1
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
epub2pdf script, now with GUI!

So... someone told me that I should create a GUI version of my epub2pdf.sh script, and after some time I bit the bullet and had a quick learning of python and Qt. This is a first working version of the thing. It not only generates PDF files from ePUB (if you have prince installed), but also creates thumbnails for use in the Cybooks (if you have convert installed). I think the interface is quite self-explanatory, at least for someone who knows more or less what the program is meant to do.

I'm sure there are many things that can be improved or added, and I'm open to suggestions. Something I'd like to do but I don't know how is having the output from prince redirected to some pop-up window (currently, the whole GUI just freezes while it runs), I'd appreciate any help with this.

Umm... as I said, it's a python script with PyQt4, so I guess both of them are needed. I have them in my linux box, and it works here, but I know nothing about MacOS or Windows.

Command line version
Calibre plugin version

EDIT (v 1.1):

Fixed detection of Book CSS
Included default CSS
Added tab to view CSS files in the ePUB
The generated PDF now includes correct title and author (or so I hope)

EDIT (v 1.2):

Fixed some issues in Windows
Fixed PDF metadata
Show only image files for possible covers
Show also HTML files in CSS viewer

EDIT (v 1.3):

Decode percent-encoded filenames
Fixed file path computation for non-UNIX filesystems (again)
Fixed metadata setting (truncate modified file on writing)
Fixed treatment of empty creators

EDIT (v 1.4):

There's apparently a bug in Prince that means links with directory separator do not work correctly in Windows, unless the command line is passed with unix/http-style paths. I hope it works fine with this version.
Attached Thumbnails
Click image for larger version

Name:	snapshot.png
Views:	2692
Size:	189.1 KB
ID:	54694  
Attached Files
File Type: zip epubutils-1.1.zip (6.9 KB, 1231 views)
File Type: zip epubutils-1.2.zip (7.1 KB, 1833 views)
File Type: zip epubutils-1.3.zip (7.2 KB, 856 views)
File Type: zip epubutils-1.4.zip (7.2 KB, 1728 views)

Last edited by Jellby; 12-26-2013 at 07:50 AM.
Jellby is offline   Reply With Quote