View Single Post
Old 04-15-2009, 11:01 AM   #9
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by DigitalFeonix View Post
Essentially the script takes three arguments; a site, a story id and an output format. I slurp the whole story into an associative array - using htmlpurifier as it's brought in - and output using the desired format.

For epub the .opf is created using this

PHP Code:
**snip** 
The .oeb script takes the same associative array and outputs the flat .oeb file with the mime wrapping, building the .opf part the same way. This .oeb script was intended to create files suitable for upload to the eBookwise personal content server.
Good to know. I take it that the server side .php code would have to be installed on a personal server. Would this be easy to port to Python i.e. Impserve plugin?

I'm working on a Perl script, Epub2IMP.pl, that will convert any .epub to .imp after it is tweaked to accomodate some shortcomings of the ETI eBook Publisher software. It seems that any <img src> with a width=100% stretches the image without regard to the image's aspect ratio. Also, any CSS applied to <div class=>'s doesn't appear to be honoured so must be wrapped within a <p class=> </p> with the same CSS class reference.

To boot, within a .opf, even capiltalized Dublin Core metadata elements i.e. <dc:Title> cause problems. My Perl script will do many text subtitutions to alleviate these issues. Hopefully, ETI will improve their .epub support, especially since they co-authored many of the standards involved.
nrapallo is offline   Reply With Quote