View Single Post
Old 04-23-2009, 12:57 PM   #25
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
allow .opf conversions to .imp in any2IMP

OK, let the enhancements begin!

I changed line 83 in any2IMP.js to:
Code:
    project.CSS = 2;
This will allow margins to be better supported in the resulting ebooks. I think this is a MUST!

I added another "convert from" if statement before line 40 in any2IMP.js, namely:
Code:
if (szBaseNameExt == ".opf"){
WScript.StdOut.WriteLine("Converting... Please wait");
oBuilder.BuildFromProject(
				sDirName + "\\" + fileName);
				WScript.StdOut.WriteLine("Conversion completed");
				WScript.Quit();
}
Now only if we can get access to the .tmp (html) file that gets created (and then deleted) by eBook Publisher as well as the images. I tried .epub, but the images are not stored (a bug with eBook Publisher). Previously, I was able to overcome this by first creating the older .oeb and then thereafter creating the .epub (see this solution in my latest mobi2imp.pl v9.4d)

Oh, by the way, with the above ability to convert directly from .opf to .imp, you will need to tweak in any2IMP.au3 line 44 again to be:
Code:
			$OpenedFileName = FileOpenDialog("Choose file...", $LastDir, "MS Word .doc files (*.doc)|MS Word .rtf files (*.rtf)|MS PPT .ppt files (*.ppt;*.pps)|HTML .htm files (*.htm*)|TEXT .txt files (*.txt)|OPF .opf files (*.opf)|All Files (*.*)")
.
Enjoy!

Last edited by nrapallo; 04-23-2009 at 03:28 PM.
nrapallo is offline   Reply With Quote