View Full Version : Mobi2IMP 9.4 with new Windows GUI & UTF-8


nrapallo
03-22-2008, 02:22 AM
I've released Mobi2IMP 9.4 now, which has minor bug fixes and some enhancements.
Just download, unzip and install the Mobi2IMP-9.4-Installer.zip attachment followed by the updated Mobi2IMP.exe dos executables in Mobi2IMP-9.4e.zip. Please read the EDIT at the bottom of this post for more information.

Mobi2IMP converts non-DRMed Mobipocket .PRC/.MOBI and PalmDOC .PDB files directly to .IMP formats (i.e. EBW1150 .imp, REB1200 .imp, REB1100 .rb and/or OEBFF .oeb/ETI .epub).

This project was created by Nick Rapallo and was inspired by PDFRead's .IMP creating module (ImpOutput) by Ashish Kulkarni and 'mobi2html' in Mobiperl by tompe on mobileread.com.

Changes in this release: improved the removal of stray blank lines BEFORE a page-break that caused empty blank pages to be inserted into the ebook.
By default, Mobi2IMP now pads images with white space to match the device's aspect ratio. It also now relocates links to images that pointed to between an illustration and caption as well as removes any blank lines there between. (zelda_pinwheel will appreciate this when re-converting HarryT's 'Austen' classics)
To avoid these fixes, two new switches are added to not fix images or image links between illustrations and captions. Choose '--noimagefix' to not pad/resize images to device's aspect ratio and '--noimagelinkfix' to leave image link locations "as is" and not remove blank lines before captions.
minor code clean-up and more informative messages.

REQUIRED: You must have the eBook Publisher software previously installed to facilitate the conversions. Due to the new Windows GUI, you no longer need to use the dos/command prompt or perl script.

Also, batch conversion using 'prc2imp.bat' can be done on Windows for all .PRC/.MOBI/.PDB in a folder. This will allow those with many mobipocket .prc/.mobi/.pdb files to migrate them to their ebookwise 1150 easily. For recursive batch processing, see post#11 below (http://www.mobileread.com/forums/showpost.php?p=163046&postcount=11)

Then all you have to do is put mobi2imp.exe in your path (or current directory), your 'prc2imp.bat' into the current directory containing your .prc, and then double-click 'prc2imp.bat' (just ensure you don't have too many .prc as ALL of them will be converted!)

After downloading and unzipping the Windows installer below (Mobi2IMP-9.4-Installer.zip), install the Mobi2IMP GUI to any drive location. After this Windows installation, in samples folder of the Mobi2IMP home directory (i.e. C:\Program Files\Mobi2IMP), a sample batch file can be executed to produce the sample .IMP ebooks along with the .opf project file used internally.

With mobi2imp, just beware that you're stuck with any inconsistencies (if any) introduced by the .prc/.mobi original when converting over. However, you can load the resulting .opf file into eBook Publisher and can further edit/tweak/build it, if necessary. :2thumbsup

For a MINI-TUTORIAL, check here (http://www.mobileread.com/forums/showpost.php?p=153083&postcount=21).

For the Mobi2IMP Wiki, check here (http://wiki.mobileread.com/wiki/Mobi2imp).

For the Mobi2IMP Development Hub, check here (https://dev.mobileread.com/trac/mobiimp).

Enjoy!

-Nick


Previous changes...This all started out at post #197 (http://www.mobileread.com/forums/showthread.php?p=148120#post148120) in the Mobiperl thread and has evolved into a functional perl script and Windows GUI executable.

version 2 - Now 'Category Author Title' are optional and don't need to be provided (if the mobipocket ebook was 'well' composed).

version 3 - Now more forgiving of poorly constructed anchors (seen in feedbooks.com .prc's) and will insert the '<a name' tag as long as the 'filepos' points to the start of a tag i.e. "<". This will help retain most, if not, all hyperlinks!

version 4 - Things that changed:
- Now better warns that eBook Publisher must be installed first.
- now takes switches '--1200' and '--1100' to allow for the simultaneous creation of the REB 1200 and REB 1100 versions along with the EBW 1150 .IMP version.
- conversly, if the switch '--1150' is specified, then the EBW 1150 .IMP version is NOT created.

version 5 - Things that are allowed now:
- now allows you to change the text one font size larger ('medium') and one font size smaller (back to 'x-small') by using '--largerfont' and '--smallerfont' respectively.
- per JSWolf's request, you can now change margins from the default (2%) to '--nomargins' (0%), '--largemargins' (5%) and even '--hugemargins' (8%)
- you can change the default text-align from justify to '--nojustify' (i.e. left aligned).
- further to Kovidgoyal's recent 'mobi2oeb' post, now can output in OEBFF (.oeb) output with '--oeb'.
As a result, the output can be any and all at once of: '--1150' .IMP, '--1200' .IMP, '--1100' .rb and '--oeb' OEBFF!

version 6 - Changes:
- per DaleDe's request, you can now change margins from the default (2%) to '--tinymargins' (2px).
- no longer requires external program (nconvert.exe); all image 'fixing' done internally by GD.pm (thanks to tompe for this suggestion)!

version 7 - Changes:
- per DaleDe's suggestion, you can now add small indent with '--indent'.
- per JSWolf's request, you can now eliminate (blank line) paragraph separation with '--nopara' (may also need to indent para with '--indent').
- per DaleDe's suggestion, you can now get more info with '--verbose' or '--debug'.
- first attempt at a 'readme.txt' - you get this also by executing 'mobi2imp' without any paramenters.

version 8 - Changes:
- can now override default .IMP naming of 'Author - Title'.ext, by using '--out MYIMPBOOKNAME' to specify .IMP filename produced (omit .ext)
- BUGFIX: now strip <body> tag of any BD/mobi specific in-line styles before start 'fixing' things.

version 9 - Changes:
- can now handle (text) .pdb files properly i.e. PalmDOC 'TEXt'/'REAd' type
- now makes the BookDesigner notice at the end 'small print' by default :thumbsup:
- can make that BD notice 'big print' with '--BDbig' (case sensitive)
- can make that BD notice start on a newpage using '--BDnewpage' :2thumbsup
- can even remove that BD notice at the end with '--BDremove' :eek:
- to add flare, can use '--bgcolor #FF80FF' to set background color for every page
- BUGFIX: Only when using '--nopara' option, some <br />'s get ignored so another <br /> is added; if this creates issues, then '--noBRfix' will not add the second <br />.

version 9.1 - Changes:
- installs a Windows GUI ala PDFRead that can be used to convert files instead of using dos/perl. It even remembers 'options' last chosen!
- removed 'ExplodeDir' as a required parameter and uses, as the default temp/explode DIR, the filename without extension (can be overridden).
- added ability to optionally add a (default) 'cover' image to every conversion from .mobi to .imp based on the embedded cover in the source file.
- implemented optional running headers (ala GEBLibraian) with two variants: one with the traditional 'Title Author' line followed by a <hr>; another with the header line only in color specified by the user.
- added better documentation and even a mini-tutorial

version 9.2 - Changes:
- can now be installed on a different drive than your C: drive; just keep the same subdirectory structure for the GUI options file to be loaded properly.
- removed '--tinymargins', '--largemargins' and '--hugemargins' and replaced with '--LRmargins LR' where LR can be inputted by the user (usually 2px, 5%, or 8%).
- corrected GUI to replace 'no indent' option with proper 'use indent' as default is to NOT use any indent. Also moved things around a bit to make room for future options.
- updated the 'Mobiperl' part of the code to implement recent improvements tompe put into 'mobi2mobi' and 'mobils' (like longtitle!).
- FAQ: If Mobi2IMP is run with no parameters, then the help screen now warns that 'If resulting .IMP is wrong version in viewer, just re-install eBook Publisher!'
- FIX: stripped from 'Title' and 'Author' any characters that are invalid for filenames.
- FIX: removed stray blank lines BEFORE a page-break that caused empty blank pages to be inserted into the ebook.
- FIX: fixed aspect ratio of images that caused images to 'bleed' into bottom and become 'chopped off' for either the 1150 and/or 1200 .IMP versions. Just padded sides of images with 'white' background until aspect ratio no longer causes a problem with eBook Publisher's weak handling of image re-sizing!
- better verbose/debug info; information is good!

version 9.3 - Changes:
- added UTF-8 encoding support recently implemented in Mobiperl by tompe.
- changed 'cover_nr.html' to replace L/R margin '2em' with '2px' to allow for bigger images.
- Allowed 'aspect ratio' used to fix image resizing issue to be tied to device output. For 1150 or 1100 output, an aspect ratio of 0.72 is used; whereas if 1200 is selected for output, it will be overridden by an aspect ratio of 0.79 (even for other output options within the same conversion). It will be better to not simultaneously convert a file, but rather do the 1200 first, then the 1150 or others.

Pending improvements (available now in below Mobi2IMP 9.4e dos version .zip)

- NEW: Now converts Mobipocket-specific tags like <div height="0em"> and <div width="0em"> to
<div style="margin-top:0em"> and <div style="text-indent:0em">. Works for all tags like "<div " but "<img ".
Thanks to Nate the great for the inspiration!
- FIX: Allows proper <p>, <div>, <ul>, <li> closing tags now. Thanks to Jellby for the tip!
- FIX: Re-tweaked the image resizing to better allow one line of text below the image i.e. a "caption".
- FIX: Now properly uses lowercase tags instead of depreciated UPPERCASE tags.
- FIX: Tweaked the image resizing to allow one line of text below the image i.e. a "caption".
- FIX: Allows proper handling of null (0) content EXTH data.
- NEW: Now implemented extradata MobiPerl processing for multibyteoverlap coded ebooks.
- FIX: Now helps retain ill-formed links. When trying to find a "home" for a filepos link, Mobi2IMP will be aggressive, despite bad placement, and scan forward up to 256 chars away from specified filepos location.
- NEW: Now better handles image (aspect-ratio) resizing and allows for the simultaneous sequential conversion to EBW1150 .imp and REB1200 .imp.
- NEW: Now can build a (non-Sony) ETI .epub when the OEBFF (.oeb) GUI option is selected. Will cause the simultaneous creation of the .oeb ebook, but that .oeb can be deleted if the 'debug info' is selected (bug: not yet working).
- NEW: Allows the proper (functional) conversion of Feedbooks.com news feeds despite some quirks. Now can download RSS/news feeds in mobipocket format and convert them directly into .imp.
- NEW: Allows the proper (functional) conversion of Calibre news feeds despite some quirks. Now can download RSS/news feeds in mobipocket format and convert them directly into .imp.
- FIX: Now strip/blank out nulls and characters below ASCII 32, except chars 9 to 15. Also, remap some such chars to their HTML code equivalents. Now allows the converion of the MobileRead.com Mobipocket Download Guide as well as the Feedbooks.com Kindle Download guide into .imp.
- NEW: Now prints a summary of the .imp ebook/metadata info when done.
- FIX: Now properly uses the output directory to store results in a different directory than the input. Thanks to Elsi for discovering this.
- FIX: Now properly manipulates BookDesigner notice at end "as advertised".

TO DO:
- :chinscratch:

EDIT: I will no longer change the GUI installer for minor bug fixes that do not change to GUI options screen. Instead, I will update only the Mobi2IMP.exe in the 'Mobi2IMP' directory. Unzip the highest version number followed by a letter below, if any, into the 'Mobi2IMP' home directory overwriting the old files/.exe in that directory as well as the 'bin', 'doc' and 'src' subdirectories. At the next release, these files will be deleted!

Previous version downloads: 54

nrapallo
03-22-2008, 02:23 AM
Reserved for updated Tutorial and FAQ.

FAQ: If resulting .IMP is wrong version in viewer, just re-install eBook Publisher!I see you have found the infamous bug that the 1150 .imp "thinks" its a 1200 .imp!!!

The solution to this is to re-install eBook Publisher software. Since you may also use BookDesigner or GEB LIbrarian (aka eBookwise Librarian), the various .dlls used get confused and need to be the eBook Publisher versions to use Mobi2IMP properly!

FAQ: GEB (eBookwise) Librarian fails to transfer/load the resulting .IMP!The target output defaults to where the source input is. The resulting .IMPs are stored there. You can then manually copy the files (via Windows Explorer) over to your Bookshelf directory under the GEB Librarian home directory.

Word of caution, do not put the 1150 .imp in the same GEB Bookshelf as the 1200 .imp as GEB Librarian will get confused and the ebooks will not transfer properly. The reason seems to be that the ebooks were created at the same time and hence have the same Unique Edition ID (I think). Anyways, to be safe, just don't mix the resulting .IMPs in the same Bookshelf. Just segregate 1150 and 1200 .IMPs.

FAQ: I want to get Mobi2IMP, but don't want to use the Installer, for personal reasons!The Mobi2IMP Dev Hub (https://dev.mobileread.com/trac/mobiimp) Download section will continue to host the current Mobi2IMP dos executable for each release version i.e. 'Mobi2IMP-9.4-dos.zip'. Also, the Dev Hub site has the latest Mobi2IMP noSamples and noInstaller version i.e. 'Mobi2IMP-9.4-noSamples-noInstaller.zip'. These versions are for more experienced users who know what the Installer does and thus can avoid using it.

DaleDe
03-22-2008, 01:10 PM
I just went to the development site and tried to download stuff. The pl file is forbidden (likely a permission problem) and the zip file is much smaller than the one above in the forum. As a matter of fact the exe file is the same size as the zip file above but the zip file on the development site uncompresses to only 2.6 meg. Seems to be a problem somewhere.

Dale

nrapallo
03-22-2008, 03:15 PM
I just went to the development site and tried to download stuff. The pl file is forbidden (likely a permission problem) and the zip file is much smaller than the one above in the forum. As a matter of fact the exe file is the same size as the zip file above but the zip file on the development site uncompresses to only 2.6 meg. Seems to be a problem somewhere.

Dale

The Development Hub site is still a "work in progress..."; most things haven't fully been setup yet. I'm learning as I go. I'll see what could be wrong.

In the meantime, use the Windows Installer .zip (http://www.mobileread.com/forums/attachment.php?attachmentid=11689&d=1206163303) in the first post above for now. It will 'install' the Mobi2IMP GUI 9.1 program (Mobi2IMP-gui.exe) along with dos executable (Mobi2IMP.exe), source (mobi2imp.pl), documentation and some samples.

By the way, the icon for Mobi2IMP that gets put in your Start Menu, can be later copied to the desktop for easier access.

EDIT: Ok this Dev Hub stuff is weird. The source mobi2imp.pl there is 'Forbidden' due to the .pl extension. I just replaced it with mobi2imp.pl.txt and it works now! Also, the 9 MB .exe at the Dev Hub site is the same file within the Windows Installer .zip above. The MobileRead forums do not allow .exe files to be attached (and for good reason!) so it shows up here as a .zip. The Mobi2IMP-exe.zip at the Dev Hub is just the dos executable not the GUI. Hope this helps explain things.

zelda_pinwheel
03-22-2008, 06:54 PM
yeah baby !! a gooey interface ! AND auto headers !! pretty soon, i won't need to tweak the code at all, anymore...

JSWolf
03-22-2008, 11:04 PM
Would it be possible to make a version 9.1 that has no GUI bloat that only uses the command prompt please? Before 9.1 i twas a nice simple program, easy to use without the need for an installer. Thanks!

nrapallo
03-22-2008, 11:17 PM
Would it be possible to make a version 9.1 that has no GUI bloat that only uses the command prompt please? Before 9.1 i twas a nice simple program, easy to use without the need for an installer. Thanks!

Jon, the Dev Hub has the file Mobi2IMP-exe.zip (https://dev.mobileread.com/dist/nrapallo/mobiimp/Mobi2IMP-exe.zip) which contains only the dos executable and no GUI frontend.

The GUI is not the bloat here; it is the samples that I included for novices to experiment with. The samples comprise almost 75% of the size of the installer. The GUI (Mobi2IMP-gui.exe) is very tight and efficient at only 61 KB compared to the dos executable (Mobi2IMP.exe) at 2.6 MB!

Try the Windows installer and then just delete its samples directory (I know YOU don't need any samples)! It is easy to use and just as powerful as the dos executable (except for batch processing of many files).

JSWolf
03-22-2008, 11:24 PM
Could we have a ZIP file with just the GUI, the non-GUI and the documentation. The GUI and the non-GUI really don't need to be installed in order to work.

I'll give the GUI a go and see how it works. And well done!

nrapallo
03-22-2008, 11:44 PM
One problem with the windows installer is that it creates and adds a mess of files and directories I don't need or want Plus, it also puts it in a place that's not where I want it. And if I tell the installer to install it where I want, I have files I have to delete. Plus, I don't want an uninstall added to my system as I liked it being a nice simple no install version.

What I am saying is this needs to be like it used to be for those of us who aren't novices. What should happen in the ZIP file should contain all the files the installer installs without the installer. Then we can pick and choose what bits we want and were to put them.

Attached in the .zip is Mobi2IMP 9.1 without the installer and samples. Contains all important files and you can pick and choose which ones you want to keep. BTW, the GUI requires the default location of the dos executable/command file so for 'roll-your-own' types, it may not function.

Hope this helps.

scruffy
03-23-2008, 09:41 AM
The only thing missing now is the option to do a recursive conversion, over a whole directory of files... the current batch file only does within a single folder/directory.

Give us the ability to mass convert via the GUI, since you are calling the commandline program with settings, just build the tree (given a directory) and call it for each matching file found (ie prc,mobi,pdb or all), same settings for each.

nrapallo
03-23-2008, 12:12 PM
The only thing missing now is the option to do a recursive conversion, over a whole directory of files... the current batch file only does within a single folder/directory.

Give us the ability to mass convert via the GUI, since you are calling the commandline program with settings, just build the tree (given a directory) and call it for each matching file found (ie prc,mobi,pdb or all), same settings for each.

And how many different times are you going to do this? :D Anyway, here is a solution without using the GUI directly ...

As you know, the GUI is only a front-end for the command-line program. After done, the dos box/command prompt remains. Just copy the top of the screen where your calling options are and paste them into 'prc2imp.bat' in place of the '--verbose'.

Now, in the 'prc2imp.bat' file, place '/r' between 'for' and '%%i' and you'll get a recursive convert with YOUR options! Should look like this:

for /r %%i in (*.prc) do mobi2imp.exe --verbose "%%i" "%%~ni"

You will end up converting all your files, recursively.

And how many different times are you going to do this? :D :D

zelda_pinwheel
03-23-2008, 12:39 PM
i just used the new version to convert HarryT's version of Jane Austen's Pride and Prejudice (illustrated), so i thought i would give my own first impressions (sorry for the pun :rolleyes:). this is partly for Nick, and partly for other people interested in making conversions, who may not have a lot of experience / technical knowledge. be not afraid ! it's really easy.

overall, brilliant ! i reinstalled eBook Publisher (i had that bug, where the supposed 1150 output was actually a 1200 file), and the output easily created imp (1150), imp (1200), opf and oeb files, and also left the html file. so from here, i could make any other format i wanted to, refine the output i already got, or just save the sources as a precaution for possible future conversion to new formats. it required little to no effort / technical knowledge on my part, which means that conversion is now accessible to a lot more people than before, which could be really great news for the upload section ! :nice:

some questions / suggestions for v9.2

1. css indents since you can specify "no indent", i assume the para indent is added / kept by the conversion tool. however looking at the code, i notice that the indents are made using non-breaking spaces, rather than defining an indent in em in the css code (in fact, the indent is defined, as 0em). so, why not make the indent using the css ? it would be more elegant code and lighter files... and it shouldn't be too hard to modify, since the css statement is already there. unless it is to avoid problems with images ?

2. batch conversions as other posters have mentioned, i would love to be able to make a batch conversion (like with the .bat files from before the gui), but using the gui since there are other options which i appreciate (headers !!!). is this possible ? how ?
[EDIT : it looks like we were posting at the same time ! now there is a solution for batch conversions, great ! i will test it out right away, since i have more Austen to do... ;)]

3. speaking of headers.... first, yay !! thanks so much for adding that ! it's a little detail that i find really important and it's great that i don't have to add them by hand anymore ! now, since we have them, what about adding the option to format them in font-family:smallfont ? i personally prefer this, it sets the header off better from the body text and makes it less intrusive, while still being present. also, it can be really useful, in the case of overly-long titles, to gain the extra bit of space so it stays on one line...

well, that's all that strikes me ! once again, thank you for this excellent tool. have a drink on me, just tell the barman to put it on my tab ! :drinks:

nrapallo
03-23-2008, 01:10 PM
i just used the new version to convert HarryT's version of Jane Austen's Pride and Prejudice (illustrated), so i thought i would give my own first impressions (sorry for the pun :rolleyes:). this is partly for Nick, and partly for other people interested in making conversions, who may not have a lot of experience / technical knowledge. be not afraid ! it's really easy.

overall, brilliant ! i reinstalled eBook Publisher (i had that bug, where the supposed 1150 output was actually a 1200 file), and the output easily created imp (1150), imp (1200), opf and oeb files, and also left the html file. so from here, i could make any other format i wanted to, refine the output i already got, or just save the sources as a precaution for possible future conversion to new formats. it required little to no effort / technical knowledge on my part, which means that conversion is now accessible to a lot more people than before, which could be really great news for the upload section ! :nice:

Thanks for the accolades!

That "1200 instead of 1150" bug is going to make me create a FAQ!!!

some questions / suggestions for v9.2

1. css indents since you can specify "no indent", i assume the para indent is added / kept by the conversion tool. however looking at the code, i notice that the indents are made using non-breaking spaces, rather than defining an indent in em in the css code (in fact, the indent is defined, as 0em). so, why not make the indent using the css ? it would be more elegant code and lighter files... and it shouldn't be too hard to modify, since the css statement is already there. unless it is to avoid problems with images ?

The 'non-breaking spaces' you see were in the original .prc (probably put there as a pseudo-margin by the BookDesigner program-don't get me started). Using CSS, I do add a '1em' (width of the 'm' character) indent that can be turned off with '--noindent'. I can't/won't get rid of the 'non-breaking spaces'.

2. batch conversions as other posters have mentioned, i would love to be able to make a batch conversion (like with the .bat files from before the gui), but using the gui since there are other options which i appreciate (headers !!!). is this possible ? how ?
[EDIT : it looks like we were posting at the same time ! now there is a solution for batch conversions, great ! i will test it out right away, since i have more Austen to do... ;)]

I 'borrowed' this idea from PDFRead's author, Ashish Kulkarni (and his installer and his GUI idea...)

3. speaking of headers.... first, yay !! thanks so much for adding that ! it's a little detail that i find really important and it's great that i don't have to add them by hand anymore ! now, since we have them, what about adding the option to format them in font-family:smallfont ? i personally prefer this, it sets the header off better from the body text and makes it less intrusive, while still being present. also, it can be really useful, in the case of overly-long titles, to gain the extra bit of space so it stays on one line...

I too like the professional look and fell of using 'font-family:smallfont' so this will definitely be part of version 9.2. In the meantime, just hand edit it in.

well, that's all that strikes me ! once again, thank you for this excellent tool. have a drink on me, just tell the barman to put it on my tab ! :drinks:

:party4: :party4:

zelda_pinwheel
03-23-2008, 05:46 PM
first book made with the gooey version (and a few manual retouches) online. (http://www.mobileread.com/forums/showthread.php?p=163096#post163096) yay ! more to follow.

but, notwithstanding the tips from the Department of Recursiveness Department, batch file goodness remains abstruse for the moment. i did a new conversion, and looked at the top of the window, and i can't see anything that looks like formats, header options, alignment... what *exactly* should i copy to the .bat file ?? to be more clear, my DOS window has this at the very top :

MOBIHEADER uniquid: 1691981635
MOBIHEADER ver: 4
MOBIHEADER exthflg: 80
EXTH doctype: EXTH
EXTH length: 156
EXTH n_items: 7
ITEM: 64 14 - 100 20 - Austen, Jane
ITEM: 6e 11 - 110 17 - FIC004000
ITEM: 69 10 - 105 16 - Classics
ITEM: 12c 36 - 300 54 - 0x (no, sorry, i really can't be bothered to retype that gazillion-digit number by hand)
ITEM: c9 c - 201 12 - 0c00018
----> Cover Image_Index: 24
ITEM: cb c - 203 12 - 0x0000
ITEM: ca c - 202 12 0x00019

(and then there's all the images listed with names and dimensions and such).

if it helps, these are the output options i've selected in the interface :
- REB1200 .imp
- add cover image
- OEBFF .oeb
- no justify
- BD Notice will be removed
- no para sep.
- Header + Color FFFFFF
- verbose
- debug info
- bgcolor FFFFFF

[PRE-EMPTIVE EDIT : it seemed to me that the first info of my DOS window must be getting cut off (i don't know if there is a maximum length to a DOS window ?), so i did a conversion on a very small mobi file with no images, and i unselected "debug info". problem solved, i can see the options at the top of the window. i'm leaving this part of the message though, in case someone else is as big a goon when it comes to this stuff as me :rolleyes: i'm going to try the recursive batch repetitive conversion recursiveness now. further updates as events warrant ;)]

zelda_pinwheel
03-23-2008, 06:52 PM
thank you, Department of Recursiveness Department, batch processing works ! i have imp versions of all Harry's Austen books now, just cleaning up the code a little bit and fixing the illustrations before uploading them.

a question about that : i put all my mobi files to be converted in the mobi2imp\bin directory in my system drive (where the .bat file is), but i have the impression that the "installer" doesn't so much "install" as "uncompress" the file... so, if i wanted to do this work on a different drive (i like to leave my system drive exclusively for my system), can i just move the entire mobi2imp directory ? or should i only move the .bat and .exe files to the directory with my mobi files ? or should i reinstall it to the I drive ? or ???

as for "don't get me started" on BookDesigner program... seriously ! that thing makes some wacky code... what's up with the open <p> tags before the images, but no closing p tag... or the double tags like <i><i> (...) </i></i> ?? why ?? :blink:

i've been following the thread about writing a new ebook creation tool, i really hope they do it...

in the meantime, i should have enough to keep me busy with eBookPublisher and mobi2imp...

nrapallo
03-23-2008, 07:30 PM
[PRE-EMPTIVE EDIT : it seemed to me that the first info of my DOS window must be getting cut off (i don't know if there is a maximum length to a DOS window ?), so i did a conversion on a very small mobi file with no images, and i unselected "debug info". problem solved, i can see the options at the top of the window. i'm leaving this part of the message though, in case someone else is as big a goon when it comes to this stuff as me :rolleyes: i'm going to try the recursive batch repetitive conversion recursiveness now. further updates as events warrant ;)]

That's it! :2thumbsup

Loose the 'debug info' option and the "top of the screen" will not be pushed off to oblivion! The 'verbose' alone should give you more than you need!

JSWolf
03-23-2008, 07:53 PM
thank you, Department of Recursiveness Department, batch processing works ! i have imp versions of all Harry's Austen books now, just cleaning up the code a little bit and fixing the illustrations before uploading them.
What needs to be fixed?

DaleDe
03-23-2008, 07:54 PM
Hi Zelda, when pronounced the letter GUI sound like Gooey but in text they should be GUI as nobody will make the association you spell it gooey. GUI mean Graphic User Interface. Thanks for the efforts on the books.

Dale

zelda_pinwheel
03-23-2008, 07:59 PM
Hi Zelda, when pronounced the letter GUI sound like Gooey but in text they should be GUI as nobody will make the association you spell it gooey. GUI mean Graphic User Interface. Thanks for the efforts on the books.

Dale

oh sorry about that ! i'll write GUI from now on. i just learned it is pronounced "gooey" in english and i think it's really funny, that's why i spelled it that way... :p

[EDIT i know it means Graphic User Interface, that's why i was surprised the first time i heard "gooey"]

nrapallo
03-23-2008, 08:00 PM
thank you, Department of Recursiveness Department, batch processing works ! i have imp versions of all Harry's Austen books now, just cleaning up the code a little bit and fixing the illustrations before uploading them.

a question about that : i put all my mobi files to be converted in the mobi2imp\bin directory in my system drive (where the .bat file is), but i have the impression that the "installer" doesn't so much "install" as "uncompress" the file...

NOOOOOOOO!

The installer is just a smart uncompressor! I assume (wrongly so in your situation and JSWolf's situation) that the home directory will be "C:\Program Files\Mobi2IMP". Moving the program, GUI, bin directory will most certainly break this setup!

The problem is that the 'Mobi2IMP.exe' in the bin directory (the work-horse routine!) is not placed in your path by the installer.

If YOU place 'Mobi2IMP.exe' in another directory in your path (or add "C:\Program Files\Mobi2IMP\bin"; to your path), then you can call the (recursive) batch file from anywhere! Just put the 'prc2imp.bat' in the directory where your .prc files reside (NOT THE OTHER WAY AROUND. :smack: That is like "Letting the mountain come to Mohammad!").

so, if i wanted to do this work on a different drive (i like to leave my system drive exclusively for my system), can i just move the entire mobi2imp directory ? or should i only move the .bat and .exe files to the directory with my mobi files ? or should i reinstall it to the I drive ? or ???

as above, I wanted to make it simpler for novices to use, hence, rely on a forced home directory for just the 'Mobi2IMP.ini' (remembered) options file. To move this to a different drive/directory, and use the GUI, you need to retain the Mobi2IMP and Mobi2IMP\bin directory structure and expect your 'Mobi2IMP.ini' to ALWAYS reside in "C:\Program Files\Mobi2IMP". This is hard coded into the GUI (as I couldn't get it to work otherwise)!

as for "don't get me started" on BookDesigner program... seriously ! that thing makes some wacky code... what's up with the open <p> tags before the images, but no closing p tag... or the double tags like <i><i> (...) </i></i> ?? why ?? :blink:

i've been following the thread about writing a new ebook creation tool, i really hope they do it...

in the meantime, i should have enough to keep me busy with eBookPublisher and mobi2imp...

I've got company on that anti-BD wagon....:beer:

zelda_pinwheel
03-23-2008, 08:11 PM
What needs to be fixed?

well, since the original mobi files were made with BookDesigner sometimes there are odd things in the code. i'm not being very thorough today but in the output window of eBook Publisher there is a huge list of things i *could* fix, like open tags or text not inside a tag... and in addition, if i were being picky, for example, i should correct the paragraph indent, so that it is made with css and not several non-breaking spaces.

however, the books i am converting today are more or less readable directly from conversion, so, i am only fixing some small details :

1. add a "a name=TOC" tag before the TOC, for those people who like to jump back to it
2. change header to "smallfont" (personal preference) and remove the unnecessary bgcolor indication (since i chose white)
3. move image link anchors to *before* illustrations, instead of after (otherwise, if you click on the link, the illustration is not actually visible, it is on the previous page)
4. close the open <p> tags around the illustrations
5. fix the double <i> tags around the image captions with a ctrl+H replace all

(and 6. fixing the image sizes, but i think you mean specifically with the code).

if you want to see the output results, just do a conversion using mobi2imp and then open the opf file with eBook Publisher, and do "preview". :eek:

nrapallo
03-23-2008, 08:15 PM
What needs to be fixed?

EDIT: Was DELETED as zelda_pinwheel already answered this, but on second thoughts, I'll just add that I also ensure that there are no stray blank lines BEFORE a page break. That means that any: <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>

before a

<p style="page-break-before:always">
gets removed/deleted by me. The consequence of NOT doing so is that there can be situations where an unwarranted 'blank page' gets inserted. The reason is that the stray/extra blank line may allow the 'text' to continue onto a new page (which is now blank!) and then the page break comes along and that blank page stays there! Yuk!

This is sometimes unavoidable when the image used is longer than wider and bleeds into the bottom. This situation can only be fixed by re-sizing the image to the device's dimensions or inserting width/height specifications within the <img> tag. Either way you loose the generality of the code and need to re-do this resizing for the other .IMP device (REB1200).

Likewise, I also like remove stray blank lines after "THE END". Nothing more annoying than reaching "THE END" and there being one more page to read; only to find out its BLANK! :bookworm: :bookworm:

zelda_pinwheel
03-23-2008, 08:48 PM
NOOOOOOOO!

The installer is just a smart uncompressor! I assume (wrongly so in your situation and JSWolf's situation) that the home directory will be "C:\Program Files\Mobi2IMP". Moving to program, GUI, bin directory will most certainly break this setup!

ok ok calm down !! don't worry, i didn't set anything on fire !!

The problem is that the 'Mobi2IMP.exe' in the bin directory (the work-horse routine!) is not placed in your path by the installer.

If YOU place 'Mobi2IMP.exe' in another directory in your path (or add "C:\Program Files\Mobi2IMP\bin"; to your path), then you can call the (recursive) batch file from anywhere! Just put the 'prc2imp.bat' in the directory where your .prc files reside (NOT THE OTHER WAY AROUND. :smack: That is like "Letting the mountain come to Mohammad!").

ok, now i understand. the first time, i placed only the .bat file in the directory with my .prc files (I:\austen), but when i double clicked on it, it told me it couldn't find "mobi2imp.exe" (one time for every .prc file...). now i tried placing the .bat and mobi2imp.exe (from the bin directory) in the same directory with the .prc (well, one small .prc, to test), on the I drive : seems to work perfectly.

[EDIT : ARG !! watch out, the batch file looks in sub-directories as well !!! :smack: and if you already re-formatted those other opf files, well, you can start over again from a completely new source code... thank god it's not any faster.]

currently, mobi2imp is installed in the default location (C drive) ; but i don't like to mix my system with my other files, that's why the books are on the I drive.

no worries ; now i think i have it figured out, and soon i will have written your tutorial for you ;)

I've got company on that anti-BD wagon....:beer:

OH yes. :stunned: that thing is a catastrophe (*especially* for making imp files). i tried using it once ; i never thought i would be so glad to go back to eBook Publisher !

nrapallo
03-23-2008, 09:01 PM
OH yes. :stunned: that thing is a catastrophe (*especially* for making imp files). i tried using it once ; i never thought i would be so glad to go back to eBook Publisher !
This was my inspiration to develop 'Mobi2IMP'!

zelda_pinwheel
03-23-2008, 09:14 PM
This was my inspiration to develop 'Mobi2IMP'!

it's a good thing you're here, because in my house the only thing it inspired was new and creative swearing techniques ! :rolleyes:

JSWolf
03-23-2008, 10:40 PM
EDIT: Was DELETED, but on second thoughts, I'll just add that I also ensure that there are no stray blank line(s) BEFORE a page break. That means that any: <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>

before a

<p style="page-break-before:always">
gets removed/deleted by me. The consequence of NOT doing so is that there can be situations where an unwarranted 'blank page' gets inserted. The reason is that the stray/extra blank line may allow the 'text' to continue onto a new page (which is now blank!) and then the page break comes along and that blank page stays there! Yuk!

This is sometimes unavoidable when the image used is longer than wider and bleeds into the bottom. This situation can only be fixed by re-sizing the image to the device's dimensions or inserting width/height specifications within the <img> tag. Either way you loose the generality of the code and need to re-do this resizing for the other .IMP device (REB1200).

Likewise, I also like remove stray blank lines after "THE END". Nothing more annoying than reaching "THE END" and there being one more page to read; only to find out its BLANK! :bookworm: :bookworm:
Can't you have mobi2imp do all that work for you? It would help for those of us who do not do such cleaning.

nrapallo
03-23-2008, 11:07 PM
Can't you have mobi2imp do all that work for you? It would help for those of us who do not do such cleaning.

Jon, too many variables to automate this and you run the risk of changing something that you shouldn't have.

These stray blank lines take many forms '<div>&nbsp;</div>' or '<BR><BR>' or '<br /><br /></font>' or '<br /></span>' and so on...

I just visually inspect each '<p style="page-break-before:always">' to see if I should remove any preceding blank lines. It's tedious but safer!

The link to AFTER an illustration problem is not easily detectable since I do not parse the HTML code in Mobi2IMP. I think it would be hard to automate since I just gloably search and replace to 'fix' things!

In the end, it should be the preparer of the .prc (or BookDesigner program) that should fix these (broken) things.

nrapallo
03-26-2008, 02:03 AM
Please check out the Development Hub repository for Mobi2IMP (https://dev.mobileread.com/trac/mobiimp).

This repository will host the most current source, programs, and documentation as well as unreleased source revisions.

There you can fill out "tickets" for Bugs Reports / Feature Requests / Help Requests ...

I uploaded all my previous versions except for version 3 to 5, which were overwritten by version 6. Oh well, otherwise, it's pretty complete.

To have a look around is "free", but to create "tickets" requires (free) registration.

nrapallo
03-26-2008, 02:04 PM
... my DOS window has this at the very top :

MOBIHEADER uniquid: 1691981635
MOBIHEADER ver: 4
MOBIHEADER exthflg: 80
EXTH doctype: EXTH
EXTH length: 156
EXTH n_items: 7
ITEM: 64 14 - 100 20 - Austen, Jane
ITEM: 6e 11 - 110 17 - FIC004000
ITEM: 69 10 - 105 16 - Classics
ITEM: 12c 36 - 300 54 - 0x (no, sorry, i really can't be bothered to retype that gazillion-digit number by hand)
ITEM: c9 c - 201 12 - 0c00018
----> Cover Image_Index: 24
ITEM: cb c - 203 12 - 0x0000
ITEM: ca c - 202 12 0x00019

(and then there's all the images listed with names and dimensions and such).


Did you really type in the above output by hand (as indicated by the bold above)?

If so, there is a shortcut, namely, when the dos box/command prompt window is open, right-menu click on that window, select Mark, then highlight the area you want to copy with the mouse (only line blocks are copied so start at the beginning of the line). When done highlighting, press Enter key and the contents will be copied to your clipboard. Now you can paste it where you please. **DOS 101 is now out on hiatus** :rolleyes:

zelda_pinwheel
03-26-2008, 02:29 PM
Did you really type in the above output by hand (as indicated by the bold above)?

If so, there is a shortcut, namely, when the dos box/command prompt window is open, right-menu click on that window, select Mark, then highlight the area you want to copy with the mouse (only line blocks are copied so start at the beginning of the line). When done highlighting, press Enter key and the contents will be copied to your clipboard. Now you can paste it where you please. **DOS 101 is now out on hiatus** :rolleyes:

ha, if only i had know this before... because yes, all that code is in fact demonstration of my mad typing skillz. i couldn't find any way to copy the output from the dos window. hopefully next time i will remember that... thank you, DOS 101... :rolleyes:

nrapallo
03-29-2008, 12:45 PM
Can't you have mobi2imp do all that work for you? It would help for those of us who do not do such cleaning.

These stray blank lines take many forms '<div>&nbsp;</div>' or '<BR><BR>' or '<br /><br /></font>' or '<br /></span>' and so on...

Just fixed in Mobi2IMP 9.2 the first two cases above in bold that cause blank lines before a page-break. This should solve the problem most of the time.

Also, fixed in Mobi2IMP 9.2 the image aspect ratio problem discussed here (http://www.mobileread.com/forums/showthread.php?t=22209), by padding the images horizontally enough to not cause a problem. See examples below of Chapter 23 illustration in Pride and Prejudice by Jane Austen.

Mobi2IMP 9.2 to be released soon...

GeneS
03-29-2008, 09:45 PM
Nick, it's simply marvelous! Thanks for the work you've devoted to this.
Gene

:thanks:

JSWolf
03-30-2008, 12:47 AM
I look forward to 9.2. I'll be using it to do my imp conversion from Mobipocket releases.

nrapallo
03-30-2008, 01:53 AM
I look forward to 9.2. I'll be using it to do my imp conversion from Mobipocket releases.

I've released Mobi2IMP 9.2 now, which has minor bug fixes and some enhancements.

Changes in this release:
can now be installed on a different drive than your C: drive; just keep the same subdirectory structure for the GUI options file to be loaded properly.
removed '--tinymargins', '--largemargins' and '--hugemargins' and replaced with '--LRmargins LR' where LR can be inputted by the user (usually 2px, 5%, or 8%).
corrected GUI to replace 'no indent' option with proper 'use indent' as default is to NOT use any indent. Also moved things around a bit to make room for future options.
updated the 'Mobiperl' part of the code to implement recent improvements tompe put into 'mobi2mobi' and 'mobils' (like longtitle!).
FAQ: If Mobi2IMP is run with no parameters, then the help screen now warns that 'If resulting .IMP is wrong version in viewer, just re-install eBook Publisher!'
FIX: stripped from 'Title' and 'Author' any characters that are invalid for filenames.
FIX: removed stray blank lines BEFORE a page-break that caused empty blank pages to be inserted into the ebook.
FIX: fixed aspect ratio of images that caused images to 'bleed' into bottom and become 'chopped off' for either the 1150 and/or 1200 .IMP versions. Just padded sides of images with 'white' background until aspect ratio no longer causes a problem with eBook Publisher's weak handling of image re-sizing!
better verbose/debug info; information is good!

As always, enjoy!

nrapallo
03-30-2008, 01:56 AM
Nick, it's simply marvelous! Thanks for the work you've devoted to this.
Gene

:thanks:

Thank-you for the nice words of encouragement!!!

Do I hear a call for Mobi2IMP 9.3? :yahoo:

zelda_pinwheel
03-31-2008, 07:33 PM
hmm... either i'm doing something wrong (i admit, it's the more likely possibility...) or there is a bug. i tried to convert 2 different books (this one (http://www.mobileread.com/forums/showthread.php?t=22375) and this one (http://www.mobileread.com/forums/showthread.php?t=21539)) and i got the same error. i tried using the GUI and specifying manually the location, and also using a batch file made from the options i had selected in the gui (thanks so much for that tip about copying text from the DOS window by the way...).

here is the complete text of the error (did i mention, thank you for how to copy the dos window ?) :
HTML/Element.pm did not return a true value at HTML/TreeBuilder.pm line 50.
BEGIN failed--compilation aborted at HTML/TreeBuilder.pm line 50.
Compilation failed in require at script/mobi2imp.pl line 25.
BEGIN failed--compilation aborted at script/mobi2imp.pl line 25.
WoW! All done.
Appuyez sur une touche pour continuer...

here is the complete text of the batch file i tried to use :
@echo off
rem Convert .prc/.mobi/.pdb to .imp process devised by Nick Rapallo (Jan. 2008)
rem ================================================== =========================
rem Place 'mobi2imp.exe' in a directory in your Windows 'path'.
rem Place this batch file in the .prc files source directory and double-click to
rem Start the conversion of all .prc files in this directory to .imp format.
rem For EBW 1150 only output; add switch '--1200' for REB 1200 .IMP

for /r %%i in (*.prc) do mobi2imp.exe --1200 --oeb --verbose --nojustify --nopara --indent --BDremove --cover --header_color #FFFFFF "%%i" "%%~ni"

rem That's it! We are now finished the conversion of all .prc related files
echo WoW! All done.
pause

for info :
- i installed mobi2imp 9.2 in C:\Program Files\Mobi2IMP as by default
- the 2 books were in I:\mobi2imp_v9.2, along with the Mobi2IMP.exe copied from the Bin directory and the .bat file
- i had previously converted both of these books using v9.1 with no problems.

so, any ideas ? :chinscratch:

tompe
03-31-2008, 07:43 PM
"HTML/Element.pm did not return a true value at HTML/TreeBuilder.pm line 50." is a bit strange. If it was not a binary I would say that the HTML/Element.pm file must be corrupt.

Maybe the binary is built in the wrong way? Or do you have a HTML/Element.pm file in your path that overrides the compiled one?

zelda_pinwheel
03-31-2008, 08:04 PM
hmm... what exactly would be a "HTML/Element.pm" file ? just a file with that name ? i don't see one in the Mobi2IMP files anywhere (in any of the directories), and it's definitely not in my source directory with the books.

and what is a binary also ?

tompe
03-31-2008, 08:22 PM
hmm... what exactly would be a "HTML/Element.pm" file ? just a file with that name ? i don't see one in the Mobi2IMP files anywhere (in any of the directories), and it's definitely not in my source directory with the books.

and what is a binary also ?

You are running the binary mobi2imp.exe. HTML/Element.pm is a file that should be compiled into the binary. And it should not be missing a return statement of true in the end. So something is broken. One possible way it could be broken is if you have installed a file Emement.pm somewhere on your computer and that is broken and it overrides the one in the binary. Another possible problem is that the binary (mobi2imp.exe) is corrupt in some way (or built wrongly).

zelda_pinwheel
03-31-2008, 08:27 PM
could it be a conflict between the version 9.1 and the version 9.2 ? they are both installed, but in separate directories. 9.1 is working fine though...

tompe
03-31-2008, 08:30 PM
could it be a conflict between the version 9.1 and the version 9.2 ? they are both installed, but in separate directories. 9.1 is working fine though...

I do not think that could be a problem.

zelda_pinwheel
03-31-2008, 08:38 PM
ok, well i will try to re-download the installer for 9.2 and start over again, maybe it's the installation which is corrupted.

but i will do this tomorrow, it's quite late here, so i need to go to bed...

if you think of anything else to try in the meantime, i will check back tomorrow.

thanks for your help !

JSWolf
03-31-2008, 09:21 PM
nrapallo, there is a bug in 9.2 with curly quotes. Please see http://www.mobileread.com/forums/showthread.php?p=165874 to see the bug report.

nrapallo
03-31-2008, 10:29 PM
nrapallo, there is a bug in 9.2 with curly quotes. Please see http://www.mobileread.com/forums/showthread.php?p=165874 to see the bug report.

It seems the underlying .html used to generate the first test .prc is UTF-8 encoded.

I tried Mobi2IMP 9.2 and got zelda_pinwheel's (terrible) results.

I tried my own 'MakedocN' converter and got just curly quotes i.e. “ ( not HTML entities like &ldquo; ). I then tried to 'Tidy' that html and got worst results than I started with.

Then I tried tompe's mobi2html and it rendered a perfectly usable html file. Hurray!

Moral of the Story: Implement tompe's latest fixes concerning UTF-8 or else the flock will find a greener pasture to graze on!

p.s. that means a fix is in the works!
p.p.s. Zelda_pinwheel, where do you find these troublesome files. :( What issue did you have with Minor Works by Jane Austen?

nrapallo
04-01-2008, 12:52 AM
p.s. that means a fix is in the works!


Attached is a quick fix for those that convert UTF-8 encoded files! Tested on the troublesome first .prc noted above.

Just unzip the attachment into your "Mobi2IMP\bin" directory replacing the mobi2imp.exe with the attachment's .exe.

The implementation of tompe's UTF-8 improvements will make their formal debut in the next release!

EDIT: Now this .zip file is fixed for non UTF-8 files as well!

JSWolf
04-01-2008, 01:17 AM
So is 9.2b good to use on non-UTF-8 PRC as well?

nrapallo
04-01-2008, 02:41 AM
So is 9.2b good to use on non-UTF-8 PRC as well?

Now it is, as of latest edit to see post#45 above (http://www.mobileread.com/forums/showpost.php?p=165940&postcount=45).

Also changed the 'cover_nr.html' to allow more space for cover images by replacing '2em' margin with '2px' margin. Now that's more to my liking!

zelda_pinwheel
04-01-2008, 09:02 AM
p.p.s. Zelda_pinwheel, where do you find these troublesome files. :( What issue did you have with Minor Works by Jane Austen?

well, yesterday i had 2 different (apparently unrelated) problems, but both of them were miraculously fixed while i was sleeping and everything is working great (so, thanks for that !!). to clear things up,

- problem 1 was the UTF-8 problem (only on the Spring-heeled Jack file), i had this problem making a conversion with v9.1. it is resolved as you know. :happy:

- problem 2 was that i installed v9.2, but it did not work at all (i tried it on *both* the Spring-heeled Jack and Austen files, which i had previously successfully converted with v9.1 ; i chose those files because i knew they were not corrupt, as might have been a problem with a file i had never converted before). this is the error message i put higher up in this thread.

today i uninstalled v9.2, re-downloaded the installer as well as the 9.2b temporary fix, re-installed it, added the fix, tried again : works perfectly. (conversion, and even the UTF code was no problem, all the punctuation is as it should be). :2thumbsup:

and i noticed you changed the headers to use smallfont by default, brilliant !!

yay ! thanks again for all this !! have some karma, you deserve it...

now i'm off to test the new full-screen image fix you mentioned and see what that does...

nrapallo
04-01-2008, 03:06 PM
yay ! thanks again for all this !! have some karma, you deserve it...

Audrey, thanks for all your insights, as well, especially with the image re-sizing solution!

Hey, I just checked and you account for almost 50% of the karma I've received to date. Now, I know WHO I have to keep happy! :bigwave:

p.s. Audrey, any requests? (you're at the front of the line...)

zelda_pinwheel
04-01-2008, 07:59 PM
Audrey, thanks for all your insights, as well, especially with the image re-sizing solution!

Hey, I just checked and you account for almost 50% of the karma I've received to date. Now, I know WHO I have to keep happy! :bigwave:

p.s. Audrey, any requests? (you're at the front of the line...)

hmm, well i think i'm going to stop giving you karma, because i see you now have 1111 points and that *must* be a lucky number ! ;)

i'm glad i can help out with testing and theory, it seems like the least i can do, since i have no programming skills at all (i'm sure you've noticed that :rolleyes:)

since you ask, i *do* have a sort of question possibly a request concerning the images (next time i'm sure you won't say anything !)...

i tried out v9.2 on a Jane Austen file with fullscreen images and i was *amazed* to see the conversion can actually calculate the white margins to add to the images, and add them, to match the perfect ratio !! :wideeyed: well my first question is, *how did you do that ???* really, can you explain (in small, not too technical words, if possible...) ? i would never have thought it was possible. it's really brilliant.

the only little thing is... i see you made the images the full size of the 1200 screen. i understand why you did this : it's the simplest way, you can use only one set of images for both devices then, because the 1200 screen is proportionately wider than the 1150 so you are sure the re-scaled images will fit. however, these images are then *smaller* than necessary on the 1150 screen, and there is an empty space at the bottom of the screen. it seems to be a shame to me, since the 1150 display is already smaller than the 1200, not to use it completely (and, maybe i'm biased because i have a 1150 not a 1200 :rolleyes:).

so, would it be at all possible, to choose which screen size to reformat the images to in the options, like if you only want to make an 1150 format ?? if yes, would it then be possible to automatically add extra (coded) side margins (2 em right and left seems to work) to these images, if the 1200 version is generated at the same time ?

if it's not possible, then obviously it's not too important, i can continue to reformat the images using my batch treatment in photoshop if i want to optimize for the 1150, and add the margins by hand if i want to make a 1200 version. but, since we've come this far, i thought i might as well ask... :rolleyes:

anyway, i really love this tool, and i really appreciate all the work you put into it. so thanks again ! :2thumbsup:

zelda_pinwheel
04-01-2008, 08:38 PM
oh my, you're going to hate me pretty soon :rolleyes: i was just wondering, why does v9.2 not remember our selections, like v9.1 ? that was a really nice feature, for lazy / sometimes distracted people like me... if you make a 9.3, can we have it back ?

nrapallo
04-01-2008, 09:14 PM
hmm, well i think i'm going to stop giving you karma, because i see you now have 1111 points and that *must* be a lucky number ! ;)

I do like that number too, however, I like 2222 better! :D

i'm glad i can help out with testing and theory, it seems like the least i can do, since i have no programming skills at all (i'm sure you've noticed that :rolleyes:)

since you ask, i *do* have a sort of question possibly a request concerning the images (next time i'm sure you won't say anything !)...

i tried out v9.2 on a Jane Austen file with fullscreen images and i was *amazed* to see the conversion can actually calculate the white margins to add to the images, and add them, to match the perfect ratio !! :wideeyed: well my first question is, *how did you do that ???* really, can you explain (in small, not too technical words, if possible...) ? i would never have thought it was possible. it's really brilliant.

OK this is not a proof! What you stumbled upon when experimenting with the image resizing issue is that there is a "perfect" aspect ratio for each device (1150 and 1200) that will solve the problem. The 1150 should be an aspect ratio of 0.72 to accomodate running headers (0.67=320/480 theorectically), while the aspect ratio of 0.79 works better for the 1200 (0.75=480/640 theorectically). Now, which to choose, 0.72 or 0.79. You've noticed my bias toward the 1200, but I have racked my brain if I could do better for the 1150. So far nothing obvious, other than what you mention below, an inputed aspect ratio.

But before I get there, I want to see if there is a good compromise. One thought I have is if the picture is below 320x480, then I would use the 1150 aspect ratio so that I could maximize the image and not hurt the 1200 version since it has a larger screen. However, this breaks for the same image which is say doubled and larger than the screen. Then you have two images, same aspect ratio, but two different treatments. I'm leaning toward this. Any thoughts?.

Oh, yeah, technical explanation continues. Once you know the "perfect" aspect ratio then, only when the image is taller than wider (width < height) do we need to increase the width to reach the target aspect ratio. If that new width is say 300 and the old width was say 270, then we need to pad the image by 15 = (300-270)/2 on each side to center the original image. Now with an image the "perfect" aspect ratio there is no image resizing problem. Viola!

the only little thing is... i see you made the images the full size of the 1200 screen. i understand why you did this : it's the simplest way, you can use only one set of images for both devices then, because the 1200 screen is proportionately wider than the 1150 so you are sure the re-scaled images will fit. however, these images are then *smaller* than necessary on the 1150 screen, and there is an empty space at the bottom of the screen. it seems to be a shame to me, since the 1150 display is already smaller than the 1200, not to use it completely (and, maybe i'm biased because i have a 1150 not a 1200 :rolleyes:).

so, would it be at all possible, to choose which screen size to reformat the images to in the options, like if you only want to make an 1150 format ?? if yes, would it then be possible to automatically add extra (coded) side margins (2 em right and left seems to work) to these images, if the 1200 version is generated at the same time ?

Maybe what I can do is if there is only the 1150 or 1100 output selected, I can use the 0.72 aspect ratio. This would mean another convert with only the 1200 output selected and use of the 0.79 aspect ratio. No more simultaneous converting, though.

if it's not possible, then obviously it's not too important, i can continue to reformat the images using my batch treatment in photoshop if i want to optimize for the 1150, and add the margins by hand if i want to make a 1200 version. but, since we've come this far, i thought i might as well ask... :rolleyes:

anyway, i really love this tool, and i really appreciate all the work you put into it. so thanks again ! :2thumbsup:

Everything is possible, especially with compliments like this! :deal:

JSWolf
04-01-2008, 09:20 PM
Please when you scale images, please take into account the size when there is no header generated. I feel I don't need to use a header as you should already know what book it is you are reading. So I don't use that option and won't be using it. To me, it takes up room best used for more text and larger images.

nrapallo
04-01-2008, 10:14 PM
Please when you scale images, please take into account the size when there is no header generated. I feel I don't need to use a header as you should already know what book it is you are reading. So I don't use that option and won't be using it. To me, it takes up room best used for more text and larger images.

I don't think too much is lost if I accomodate a small header as seen by these two comparisons of the chapter 8 illustration from Pride and Prejudice by Jane Austen. One is for the 1150 (noheader and withheader); the other for the 1200 (noheader and withheader). This is the maximum header that will be accomodated, i.e. header+<hr> option.

I think this is a good compromise.

Mobi2IMP 9.3 on its way soon...

EDIT: Oh, yeah, forgot to show one of the benefits of accomodating a small header. If you DON'T choose the header, then there is room for a caption if you remove the <BR> between the illustration and caption! See the two new pics (noheader+withcaption).

nrapallo
04-02-2008, 12:55 AM
I've released Mobi2IMP 9.3 now, which has minor bug fixes and some enhancements.

Changes in this release: added UTF-8 encoding support recently implemented in Mobiperl by tompe.
changed 'cover_nr.html' to replace L/R margin '2em' with '2px' to allow for bigger images.
Allowed 'aspect ratio' used to fix image resizing issue to be tied to device output. For 1150 or 1100 output, an aspect ratio of 0.72 is used; whereas if 1200 is selected for output, it will be overridden by an aspect ratio of 0.79 (even for other output options within the same conversion). It will be better to not simultaneously convert a file, but rather do the 1200 first, then the 1150 or others.

nrapallo
04-02-2008, 09:21 AM
oh my, you're going to hate me pretty soon :rolleyes: i was just wondering, why does v9.2 not remember our selections, like v9.1 ? that was a really nice feature, for lazy / sometimes distracted people like me... if you make a 9.3, can we have it back ?

Is this working now in version 9.3? I have to admit, I'm lazy too! (that's why this feature is there!)

nrapallo
04-03-2008, 12:08 AM
Just fixed but not yet added to a full release:
- improve the removal of stray blank lines BEFORE a page-break that caused empty blank pages to be inserted into the ebook. Fixed for now in mobi2IMP.exe dos only (see Mobi2IMP-9.3b-dos.zip in post#1 above).

I will no longer change the GUI installer for minor bug fixes that do not change to GUI options screen. Instead, I will update only the mobi2IMP.exe in the 'Mobi2IMP/bin' directory. Unzip the highest version number followed by a letter in post#1 above into the 'Mobi2IMP/bin' home directory overwriting the old .exe. At the next release, these files will be deleted!

nrapallo
04-12-2008, 02:03 PM
I've released Mobi2IMP 9.4 now, which has minor bug fixes and some enhancements.

Changes in this release: improved the removal of stray blank lines BEFORE a page-break that caused empty blank pages to be inserted into the ebook.
By default, Mobi2IMP now pads images with white space to match the device's aspect ratio. It also now relocates links to images that pointed to between an illustration and caption as well as removes any blank lines there between. (zelda_pinwheel will appreciate this when re-converting HarryT's 'Austen' classics)
To avoid these fixes, two new switches are added to not fix images or image links between illustrations and captions. Choose '--noimagefix' to not pad/resize images to device's aspect ratio and '--noimagelinkfix' to leave image link locations "as is" and not remove blank lines before captions.
minor code clean-up and more informative messages.

Enjoy!

zelda_pinwheel
04-12-2008, 02:10 PM
I've released Mobi2IMP 9.4 now, which has minor bug fixes and some enhancements.

Changes in this release: improved the removal of stray blank lines BEFORE a page-break that caused empty blank pages to be inserted into the ebook.
By default, Mobi2IMP now pads images with white space to match the device's aspect ratio. It also now relocates links to images that pointed to between an illustration and caption as well as removes any blank lines there between. (zelda_pinwheel will appreciate this when re-converting HarryT's 'Austen' classics)
To avoid these fixes, two new switches are added to not fix images or image links between illustrations and captions. Choose '--noimagefix' to not pad/resize images to device's aspect ratio and '--noimagelinkfix' to leave image link locations "as is" and not remove blank lines before captions.
minor code clean-up and more informative messages.

Enjoy!

oh, this sounds excellent, i can't wait to try it (and good timing, Harry has redone a couple of his Austen books and I have not yet had time to redo the imp versions...) and the link fix is going to save me a LOT of time !!!

I especially appreciate the switch to NOT pad the images, for cases in which i have embedded the images in the flow of the paragraph !

thank you again Nick !!!

JSWolf
04-12-2008, 02:25 PM
Why is the 9.4 attachment not in post #1?

nrapallo
04-12-2008, 03:06 PM
Why is the 9.4 attachment not in post #1?

It's there now. :blink:

Thanks for the heads-up. :thumbsup:

TadW
04-12-2008, 03:15 PM
Just fixed but not yet added to a full release:
- improve the removal of stray blank lines BEFORE a page-break that caused empty blank pages to be inserted into the ebook. Fixed for now in mobi2IMP.exe dos only (see Mobi2IMP-9.3b-dos.zip in post#1 above).

I will no longer change the GUI installer for minor bug fixes that do not change to GUI options screen. Instead, I will update only the mobi2IMP.exe in the 'Mobi2IMP/bin' directory. Unzip the highest version number followed by a letter in post#1 above into the 'Mobi2IMP/bin' home directory overwriting the old .exe. At the next release, these files will be deleted!

nrapallo, are you using the Enhanced Message Editor interface? In some of your posts (like above) you're switching font sizes for words and letters, and I remember a similar problem when I tried to use the WYSIWYG editor. For now, I'll stick to the normal editor.

nrapallo
04-12-2008, 03:23 PM
nrapallo, are you using the Enhanced Message Editor interface? In some of your posts (like above) you're switching font sizes for words and letters, and I remember a similar problem when I tried to use the WYSIWYG editor. For now, I'll stick to the normal editor.

No I am not using the Enhanced editor (maybe I should have a look see!).

No what you see is me SHOUTING important things that may get lost in the shuffle! The font changes are deliberate. They solved some issues with newbies a while back and I didn't have the heart to remove it. I like newbies and tailor to them!

Thanks anyways,

nrapallo
06-11-2008, 01:10 PM
Just fixed but not yet added to a full release:
- FIX: Now properly uses the output directory to store results in a different directory than the input. Thanks to Elsi for discovering this.
- FIX: Now properly manipulates BookDesigner notice at end "as advertised".

Fixed for now in Mobi2IMP.exe dos only (see Mobi2IMP-9.4b-dos.zip in post#1 (http://www.mobileread.com/forums/showthread.php?t=22178) above).

I will no longer change the GUI installer for minor bug fixes that do not change to GUI options screen. Instead, I will update only the Mobi2IMP.exe in the 'Mobi2IMP/bin' directory. Unzip the highest version number followed by a letter in post#1 above into the 'Mobi2IMP/bin' home directory overwriting the old .exe. At the next release, these files will be deleted!

lindnet
07-27-2008, 08:23 PM
Hi all, I've been lurking on the board for weeks, but this is my first post. I have an EB 1150 on the way (just returned a Kindle), and I've been trying to learn how to convert some of the different ebook formats into .imp files. I don't know anything about using ebook publishing software, but I'm fairly computer literate.

I've figured out how to convert a .lit to .imp, by trial and error. But I have been trying to use the mobi2imp for literally HOURS today, and I just can't figure it out. Has anyone here written down instructions that a real newbie to all of this can follow? I've looked at the mini-tutorial and help files, and I'm just not getting it.

Thanks in advance to anyone who will take pity on me! :o

I guess I should add a little more....I do have eBook Publisher installed. When I run the GUI version of mobi2imp9.4, what I'm getting is an .imp and .opf file for both the 1150 & 1200, and a folder with an .html file. All of these files are under 5KB. If I tell it to include the cover, the files are larger and have the cover, but no book.

nrapallo
07-28-2008, 01:19 AM
...I have an EB 1150 on the way (just returned a Kindle), and I've been trying to learn how to convert some of the different ebook formats into .imp files.

The .imp files can be viewed on a PC by double-clicking them (after having installed the eBook Publisher software from ETI). The EB 1150 will read the HalfVGA (320x480) '.imp' files whereas the larger FullVGA (480x640) '_1200.imp' can only be read on the REB 1200 device (or PC viewer)!

I've figured out how to convert a .lit to .imp, by trial and error.

You can automate this somewhat by following the instructions here (http://www.mobileread.com/forums/showthread.php?t=20592) (if you haven't already done so).

But I have been trying to use the mobi2imp for literally HOURS today, and I just can't figure it out. Has anyone here written down instructions that a real newbie to all of this can follow? I've looked at the mini-tutorial and help files, and I'm just not getting it.

Thanks in advance to anyone who will take pity on me!

Everything is hard when starting out. Let's try going through some basics:

1) What input files were you trying to convert from i.e. .prc/.pdb/.mobi?
2) Did you see any notice in the command prompt window that is started by the GUI stating that the "EBW 1150 ebook created!" or any other warning/error message.
3) Did you double-click the resulting .imp to see if that is what you expected?

I guess I should add a little more....I do have eBook Publisher installed. When I run the GUI version of mobi2imp9.4, what I'm getting is an .imp and .opf file for both the 1150 & 1200, and a folder with an .html file. All of these files are under 5KB. If I tell it to include the cover, the files are larger and have the cover, but no book.

:smack: Oh, oh, the .imp file *is* the ebook! I think you converted the ebook, but need to make sure it was successful. Don't look at the '_1200.imp' file as that one is for the 1200. Does this make sense now?

If this still doesn't make any sense, post the input file (if you can along with the .html file) and the resuting 1150 .imp file and I will see what is going wrong.

lindnet
07-28-2008, 11:09 AM
1) What input files were you trying to convert from i.e. .prc/.pdb/.mobi?

It is a .prc file.

2) Did you see any notice in the command prompt window that is started by the GUI stating that the "EBW 1150 ebook created!" or any other warning/error message.

I could have sworn that it said it was created successfully. I can try it again tonight and pay more attention to exactly what it says.

3) Did you double-click the resulting .imp to see if that is what you expected?

Yes, it was empty. The first time I tried it, I had told it to include the cover, so it just had the cover in there and nothing else. When I deleted those files and tried it again without the cover, there was just nothing there. It's like it converts the cover, but not the book.

I'm not positive whether the book has DRM or not, would that be the problem?

Oh, oh, the .imp file *is* the ebook! I think you converted the ebook, but need to make sure it was successful. Don't look at the '_1200.imp' file as that one is for the 1200. Does this make sense now?

If this still doesn't make any sense, post the input file (if you can along with the .html file) and the resuting 1150 .imp file and I will see what is going wrong.

I figured that the .imp file was supposed to be the ebook, and I did figure out that it makes both an 1150 and a 1200, for the different devices. But both of those files, as well as the html file in the folder, all have less than 5KB in them. The .prc file is somewhere in the 300-400KB range.

Nick, thanks so much for helping me out, I really appreciate it!! I am at work now and the files are all on my home pc, so I will post them when I'm home tonight. :)

nrapallo
07-28-2008, 12:22 PM
I'm not positive whether the book has DRM or not, would that be the problem?

Yes, DRM'ed files would be a problem as Mobi2IMP only converts non-encrypted files.

Check what the command prompt window says at the top (and scroll back if it disappears). If the original .prc was created with 'high compression' i.e. Huffman-coding then Mobi2IMP will not work on that file. Try the mobi2oeb (http://www.mobileread.com/forums/showthread.php?t=20626&highlight=mobi2oeb) created by Kovidgoyal and part of his Calibre (Sony PRS-500/505) software package available elsewhere in the Mobileread.com forums.

Also, try converting any .prc uploaded here in the Mobi/.PRC upload forum to see 'Mobi2IMP' in action, if that .prc is giving you problems.

Nick, thanks so much for helping me out, I really appreciate it!! I am at work now and the files are all on my home pc, so I will post them when I'm home tonight. :)

You're welcome!

lindnet
07-28-2008, 10:19 PM
I did see something about a compressed file in here. I'll go ahead and post what I see in the command prompt window.....but don't worry about it too much. It wasn't an expensive book and I found it on the eBookwise site, so I can always just purchase it again in a format that works for me. I'm thinking maybe I should stick with .lit, since I figured out how to convert that one. :D

Anyway, here's what it says:

Command Line
============

"C:\Program Files\Mobi2IMP\bin\Mobi2IMP" --1200 --verbose --BDremove "C:\Docum
ts and Settings\Elvis\My Documents\My eBooks\incidentsinthelife\incidentsinthe
fe.prc"


Mobi2IMP (version 9.4) Copyright (C) 2008 Nick Rapallo (nrapallo)
FULLFILENAME: C:\Documents and Settings\Elvis\My Documents\My eBooks\incidents
thelife\incidentsinthelife.prc
FILENAME : incidentsinthelife.prc
EXPLODEDIR : incidentsinthelife
DatabaseName: Incidents_in-f_a_Slave_Girl
Version : 0
Type : BOOK
Creator : MOBI
baktime : -2082844800
# of records: 143
---------------------------------------------------
Image_Index: 0 - record-139 - 0 - 303716 - 60020 - 509 x 764
Image_Index: 1 - record-140 - 0 - 363736 - 15668 - 160 x 240
PDHEADER Version: 2
PDHEADER Length: 557921
PDHEADER NRecords: 137
PDHEADER Recsize: 4096
PDHEADER Unknown: 131072
MOBIHEADER ciflg: 1
MOBIHEADER ciptr: 140
MOBIHEADER doctype: MOBI
MOBIHEADER length: 232
MOBIHEADER booktype: 2 - BOOK
MOBIHEADER codep: 1252
MOBIHEADER uniqid: 4216148664
MOBIHEADER ver: 4
MOBIHEADER exthflg: 80
MOBIHEADER codepage: 1252
MOBIHEADER language: 1033 - ENGLISH - ENGLISH_US
MOBIHEADER LONGTITLE: Incidents in the Life of a Slave Girl
EXTH doctype: EXTH
EXTH length: 720
EXTH n_items: 17
EXTH item: 100 (x64) - Author - 14 - Harriet Jacobs
EXTH item: 101 (x65) - Publisher - 10 - Girlebooks
EXTH item: 110 (x6e) - SubjectCode - 9 - BIO000000
EXTH item: 105 (x69) - Subject - 11 - Biographies
EXTH item: 103 (x67) - Description - 435 - "Slavery is terrible for men, bu
it is far more terrible for women," Harriet Jacobs wrote in 1861. Under the pe
name Linda Brent, she published one of the few personal slave narratives writt
by a woman. Jacobs was a slave in North Carolina and made several failed atte
ts to escape before successfully making her way North. The book chronicles her
ife as a slave, her escape and hiding, and finally her reunion with her childr
.
EXTH item: 118 (x76) - 118 - 4 - 1.99
EXTH item: 119 (x77) - 119 - 3 - USD
EXTH item: 300 (x12c) - 300 - 38 - 0x1000000000000008002000000000000000ecbe
ed4094
EXTH item: 204 (xcc) - 204 - 4 - 0x0002
EXTH item: 205 (xcd) - 205 - 4 - 0x0004
EXTH item: 206 (xce) - 206 - 4 - 0x0002
EXTH item: 207 (xcf) - 207 - 4 - 0x00029
EXTH item: 201 (xc9) - CoverOffset - 4 - 0x0000
------> Cover Image_Index: 0
EXTH item: 203 (xcb) - hasFakeCover - 4 - 0x0000
EXTH item: 202 (xca) - ThumbOffset - 4 - 0x0001
EXTH item: 2 (x2) - drm_commerce_id - 14 - BOBLIVOLSI_353
EXTH item: 3 (x3) - drm_ebookbase_book_id - 5 - 94537
------> Version: 2 - 2 - DOC_COMPRESSED
---------------------------------------------------
Found 2 images
Looking for filepos
Found all 0 filepos
Adding name attributes
Fixing filepos attribute
TITLE : Incidents in the Life of a Slave Girl
AUTHOR : Harriet Jacobs
CATEGORY: Biographies
EBW 1150 ebook created!
REB 1200 ebook created!
Press any key to continue . . .


So.....what did I do wrong?

nrapallo
07-28-2008, 11:12 PM
So.....what did I do wrong?

I don't think you did anything wrong!

It seems the .prc ebook when exploded leaves behind the .html and that .html may have some incompatibilities with the eBook Publisher software. Double click the resulting .html to see if it properly displays in your web browser.

If so, then double-click the resulting .opf to launch eBook Publisher and re-build your .imp ebook to see what's happening (or not). Select your Build Target (HalfVGA output) and select Build Edition... to make the .imp. The Errors and Message window that pops up may show you why there was a halt to the ebook creation.

If it doesn't, then your .html code has some incompatabilities that need to be removed. Which ones can only be found by trial and error. If you would like me to investigate further, send me an email [nrapallo (at) yahoo.ca] with your .prc and I will try to convert it for you or at least find out what went wrong.

By the way, your .prc ebook is available (free) from PG as EBook #11030. The attached .imp was converted from the Mobipocket .mobi ebook from Manybooks.net (http://manybooks.net/titles/jacobsh11031103011030.html).

Happy investigating!

lindnet
07-28-2008, 11:33 PM
I don't think you did anything wrong!

It seems the .prc ebook when exploded leaves behind the .html and that .html may have some incompatibilities with the eBook Publisher software. Double click the resulting .html to see if it properly displays in your web browser.

The .html file is empty, just like the .imp files that were created. :(


If it doesn't, then your .html code has some incompatabilities that need to be removed. Which ones can only be found by trial and error. If you would like me to investigate further, send me an email [nrapallo (at) yahoo.ca] with your .prc and I will try to convert it for you or at least find out what went wrong.

I think I've bothered you enough for now. :o

By the way, your .prc ebook is available (free) from PG as EBook #11030. The attached .imp was converted from the Mobipocket .mobi ebook from Manybooks.net (http://manybooks.net/titles/jacobsh11031103011030.html).

Happy investigating!

You are the best! I will try again on another mobi file in the next few days and see if I can get one to work for me. I SO appreciate your patience and help. And to think I was afraid to ask my question on here! :thanks:



Ok.....I couldn't stand it. I went to manybooks.net and successfully converted a .mobi ebook!! Now I don't feel quite so dense, lol. Thanks again, Nick.

nrapallo
07-29-2008, 11:39 AM
The .html file is empty, just like the .imp files that were created. :(

I think I've bothered you enough for now. :o

Then there is some lurking DRM or Strange Compression on that .prc like:EXTH item: 2 (x2) - drm_commerce_id - 14 - BOBLIVOLSI_353
EXTH item: 3 (x3) - drm_ebookbase_book_id - 5 - 94537
"Just move on..." is sometimes a good option. :)

You are the best! I will try again on another mobi file in the next few days and see if I can get one to work for me. I SO appreciate your patience and help. And to think I was afraid to ask my question on here! :thanks:

Ok.....I couldn't stand it. I went to manybooks.net and successfully converted a .mobi ebook!!

:bulb2: Why not try the excellent .prc ebooks (to convert) here in the Mobileread.com upload forum. The Manybooks.net are 'straight' conversions (usually from text not html) and don't look nearly as nice as the hand-crafted ebooks here.

Now I don't feel quite so dense, lol. Thanks again, Nick.

See... it's not so hard once you roll up your sleeves and get right in there...

sassanik
08-29-2008, 09:10 PM
Okie, so I am trying to use mobi2imp the gui verision and when I run it the dos window opens up and I get this message:

Command Line
============

"C:\Program Files (x86)\eBook Technologies\eBook Publisher\Mobi2IMP\bin\Mobi2IMP
" "C:\Users\PETTIJOHN\Documents\My mobi books\Mobi2IMP\samples\Oliver Twist.prc"



Mobi2IMP (version 9.4) Copyright (C) 2008 Nick Rapallo (nrapallo)
FULLFILENAME: C:\Users\PETTIJOHN\Documents\My mobi books\Mobi2IMP\samples\Oliver
Twist.prc
FILENAME : Oliver Twist.prc
EXPLODEDIR : Oliver Twist
DatabaseName: Oliver_Twist
Version : 0
Type : BOOK
Creator : MOBI
baktime : -2082844800
# of records: 291
---------------------------------------------------


Then nothing more happens. A blank folder is created but nothing more. *scratches head* I am offically confused.

What am I missing? I installed the ebook publisher as well as mobi2imp program.

Help....


Amy

Amy

nrapallo
08-29-2008, 09:21 PM
Then nothing more happens. A blank folder is created but nothing more. *scratches head* I am offically confused.

You're confused? Now, I'm confused and I wrote that thing.

Try another .prc to (raw) .html converter I wrote called makedocN (http://www.mobileread.com/forums/showthread.php?p=163590#post163590).

It may be able to extract the text and images, but there would be no working hyperlinks, if any!

I had this happen once before; it was strange too. It was the Cybook manual in .prc format available from their website or from here (http://bookeen.free.fr/bin/CybookGen3/UserManual/CybookUserGuide_1_0.prc). Tompe also noticed it wouldn't convert to html. Strange!

Try some more until you know there is no solution...

p.s. does Mobi2IMP finish? or maybe it's taking a really really long time to process that .prc.

Any signs of a crash?

sassanik
08-29-2008, 11:18 PM
Nope no signs of crashing. It just seems to hang there. Nothing happens. I left it alone for about 20 minutes and it never finished.

I am running Vista, could that be part of the problem?

Amy

JSWolf
09-02-2008, 11:33 PM
nrapallo ... can you make an option for Mobi2IMP to allow it to use Mobi2OEB since Mobi2OEB works where Mobi2HTML does not?

nrapallo
09-02-2008, 11:49 PM
nrapallo ... can you make an option for Mobi2IMP to allow it to use Mobi2OEB since Mobi2OEB works where Mobi2HTML does not?

Interesting substitute, since Mobi2IMP can't handle Huff-Dic compression whereas Mobi2OEB can.

I'll probably use an external converter from .prc to .html (mobi2oeb.exe) and then further process the extracted (resulting) .html with my perl script to go from (mobipocket-specific) .html to .imp.

I'll see what I can come up with. Now where to put that input switch for which .prc to .html converter to use... :chinscratch:

JSWolf
09-03-2008, 10:01 AM
Interesting substitute, since Mobi2IMP can't handle Huff-Dic compression whereas Mobi2OEB can.

I'll probably use an external converter from .prc to .html (mobi2oeb.exe) and then further process the extracted (resulting) .html with my perl script to go from (mobipocket-specific) .html to .imp.

I'll see what I can come up with. Now where to put that input switch for which .prc to .html converter to use... :chinscratch:
I was thinking about it the other day when I found a commercial PRC that Mobi2HTML did not work on but Mobi2OEB does. I kind or thought it would be a good idea to have Mobi2OEB being used as it works with more PRC then Mobi2HTML.

nrapallo
09-03-2008, 10:11 AM
I was thinking about it the other day when I found a commercial PRC that Mobi2HTML did not work on but Mobi2OEB does. I kind or thought it would be a good idea to have Mobi2OEB being used as it works with more PRC then Mobi2HTML.

It is a timely request too as I have been explaining more and more recently (a lot through private messages) how to get deDRM'ed .prc converted using mobi2oeb first then to .imp (when Mobi2IMP fails).

I'll look at this soon, but can't right now.

JSWolf
09-03-2008, 10:16 AM
It is a timely request too as I have been explaining more and more recently (a lot through private messages) how to get deDRM'ed .prc converted using mobi2oeb first then to .imp (when Mobi2IMP fails).

I'll look at this soon, but can't right now.
Thanks... It means I can make PRC that doesn't use standard compression since I'd be able to also use Mobi2IMP.

tompe
09-15-2008, 11:32 AM
Thanks... It means I can make PRC that doesn't use standard compression since I'd be able to also use Mobi2IMP.

I think it is morally wrong to use secret formats. But that is just me.

nrapallo
09-15-2008, 11:38 AM
I think it is morally wrong to use secret formats. But that is just me.

And I think you have done a lot to 'unravel' the mysteries (secrets) behind the mobipocket format for most ebook users. Let the walls come tumbling down... :thumbsup:

=X=
09-22-2008, 01:53 PM
I'm getting the weirdest behavior here. Every time I create an IMP book from a MOBI file created from MobiCreator the default file creation is the 1200 series. I cannot make a 1150 book (which is the default eBook).

=X=

nrapallo
09-22-2008, 02:31 PM
I'm getting the weirdest behavior here. Every time I create an IMP book from a MOBI file created from MobiCreator the default file creation is the 1200 series. I cannot make a 1150 book (which is the default eBook).

=X=

Oh, Oh, I know the answer, oh, oh, pick me..... :blink:

Yeah, right, I'm usually the only one who answers this thread! :grin2:

What you have run into, =X=, is a strange occurance, but does happen!

Just re-install the eBook Publisher software (from the ETI support webpage) and this weird behavior will go away, sleep, just to be awoken some day... :smack:

I think I have this in the FAQs, in post #2 of this thread. It also happens when using PDFRead! :)

JSWolf
09-22-2008, 03:12 PM
I think it is morally wrong to use secret formats. But that is just me.
Well, I have found some commercial Mobi format eBooks that use high compression and if people want to be able to convert them to some other format, they'll need Mobi2OEB.

=X=
09-23-2008, 10:39 AM
Oh, Oh, I know the answer, oh, oh, pick me..... :blink:

Yeah, right, I'm usually the only one who answers this thread! :grin2:

What you have run into, =X=, is a strange occurance, but does happen!

Just re-install the eBook Publisher software (from the ETI support webpage) and this weird behavior will go away, sleep, just to be awoken some day... :smack:

I think I have this in the FAQs, in post #2 of this thread. It also happens when using PDFRead! :)

Ah okay, I did re-install yesterday as a fix for the impsrv. Thanks for the quick reply!


You know I should have read the FAQ and in addition to that I should have reverted to the
3 steps of software trouble shooting

Are you having software trouble?:
1) Reboot to fix the problem

If trouble persist
2) ReInstall

If trouble continues
3) See step #1

:)
=X=

JSWolf
09-23-2008, 11:04 AM
I think it is morally wrong to use secret formats. But that is just me.
Why not look at the source code for mobi2oeb? Then you can code the huffdic decompression in perl to go with mobi2html.

tompe
09-23-2008, 11:34 AM
Why not look at the source code for mobi2oeb? Then you can code the huffdic decompression in perl to go with mobi2html.

Why should that influence how morally wrong it is to use secret formats?

nrapallo
09-23-2008, 11:46 AM
Why should that influence how morally wrong it is to use secret formats?

Ok, ok, so when is mobi2html going to get that face-lift.... :chinscratch: :thumbsup:

tompe
09-23-2008, 11:49 AM
Ok, ok, so when is mobi2html going to get that face-lift.... :chinscratch: :thumbsup:

Sometime when I am sufficiently bored...

nrapallo
09-23-2008, 11:57 AM
Sometime when I am sufficiently bored...

... and now answering JSWolf's posts (and mine) in the Fictionwise ebookwise forum's somehow doesn't smack of wandering... :rofl:

tompe
09-23-2008, 11:58 AM
... and now answering JSWolf's posts (and mine) in the Fictionwise ebookwise forum's somehow doesn't smack of wandering... :rofl:

:) I read using search so I often do not notice the forum...

nrapallo
09-23-2008, 11:58 AM
:) I read using search so I often do not notice the forum...

good (quick) cover.... :thumbsup:

askyn
09-23-2008, 03:32 PM
Thank you for all your work on this program !!

Im pretty new to using the 1150 reader and even newer to using all the great utilities here on the forums ( which are a FANTASTIC source of help and information !! )

My question / suggestion is, is there a option / way to have mobi2imp delete the exploded directory after the book has been created in imp format?

Just wondering, I like to keep my directories clean etc and now i have to go in and manually delete the directory with the images and html etc.

EDIT: Also, is there a way to have the created book have the same name / title etc as the input file?

IE - input is called wilson, paul - the history

but when the imp is created ive noticed it pulls the title / auther form inside and a lot of times the file name can be drastically different

IE - output is calle Paul Wilson - The History

etc

Thank you again =)

nrapallo
09-23-2008, 04:10 PM
Thank you for all your work on this program !!

Im pretty new to using the 1150 reader and even newer to using all the great utilities here on the forums ( which are a FANTASTIC source of help and information !! )

Thanks! Most of these utilities have only recently (approx. 6+ months) been available, so you haven't missed that much... ;)

Question / suggestion is, is there a option / way to have mobi2imp delete the exploded directory after the book has been created in imp format?

No, it's not an option from within Mobi2IMP. :( The history to this is that not too long ago, nobody ever had access to the html within a .prc ebook. Now we do and that html is required to create the ebook, so it's exploded to do that.

Also, it was left exploded, as a convenience, for those that would then spend a lot of time tweaking the look of the .imp ebook to THEIR preferred standards. I guess you have to be an avid ebook creator to appreciate this "convenience". :)

It also forms a forced "backup" of sorts which most people won't do on their own. :grin2:

And the real reason, this is not in Mobi2IMP, no place to put that option on the GUI screens (add David Letterman, Top 10 list cheer, now!)

Just wondering, I like to keep my directories clean etc and now i have to go in and manually delete the directory with the images and html etc.

Thank you again =)

You win some and you ... :dunno: :)

askyn
09-23-2008, 04:16 PM
And the real reason, this is not in Mobi2IMP, no place to put that option on the GUI screens (add David Letterman, Top 10 list cheer, now!)

You win some and you ... :dunno: :)


ROFL np =)

Its easy enough to clean up the directories etc thank you.

also, it was VERY bad of me and this is a perfect example of why I shouldnt do it in the future.

While you were typing a reply to me, I actually added another question to my other posting rofl !! sorry

Ill reprint it here just so it isnt missed etc.


EDIT: Also, is there a way to have the created book have the same name / title etc as the input file?

IE - input is called wilson, paul - the history

but when the imp is created ive noticed it pulls the title / auther form inside and a lot of times the file name can be drastically different

IE - output is calle Paul Wilson - The History

etc

nrapallo
09-23-2008, 04:24 PM
EDIT: Also, is there a way to have the created book have the same name / title etc as the input file?

IE - input is called wilson, paul - the history

but when the imp is created ive noticed it pulls the title / auther form inside and a lot of times the file name can be drastically different

IE - output is calle Paul Wilson - The History

etc

Thank you again =)

Yes, that renaming thing is by design, as usually for storage purposes the filename is changed/shorten/obscured so the original creator's choice is used.

Where that too yields wacky results, just override that field in the GUI screen i.e. Title/Author/Category. Then, for the next conversion, just reinsert the word "Extracted".

askyn
09-24-2008, 01:13 AM
Thank you again.

Best praise I can say is I hope to be able to help someone as you have helped me with my questions =)

Rolnikov
12-17-2008, 01:14 PM
Hi Nick - thanks immensely for creating this software. My Rocket eBook is all of a sudden the most useful item in the house!

I am getting one odd thing happening with it - when I import a new .rb file from Mobi2Imp into the Rocket Librarian, it overwrites the previous one. The librarian regards them as being the same book, even though they have different titles.

It's easy to get around, by using the Rocket Librarian on the exploded html your program creates to create the .rb, but I'm wondering if there's a setting I could change to fix it.

Roberts324
01-20-2009, 11:40 AM
Hi Nick,

I am in the process of converting the Dictionnaire de l'Académie Française, 8e édition (1932), using Book Designer, exporting to Mobipocket Format, then using Mobi2Imp to convert to IMP format.

However, I have a problem ith the "running headers" that Mobi2Imp creates (they are one of two reasons, to begin with, why I use Mobi2Imp rather than creating the IMP file from BD, the other being a smaller resulting size for the IMP file):

Mobi2Imp apparently does not accept accented letters, with the result that this header:

Dictionnaire (8e édition - 1932) Académie Française

is replaced by

Dictionnaire (8e ?tion - 1932) Acad?e Fran?se

Is there anything I could do to correct that behaviour?

Thanks, R.

nrapallo
01-26-2009, 11:35 PM
Hi Nick,

I am in the process of converting the Dictionnaire de l'Académie Française, 8e édition (1932), using Book Designer, exporting to Mobipocket Format, then using Mobi2Imp to convert to IMP format.

However, I have a problem ith the "running headers" that Mobi2Imp creates (they are one of two reasons, to begin with, why I use Mobi2Imp rather than creating the IMP file from BD, the other being a smaller resulting size for the IMP file):

Mobi2Imp apparently does not accept accented letters, with the result that this header:

Dictionnaire (8e édition - 1932) Académie Française

is replaced by

Dictionnaire (8e ?tion - 1932) Acad?e Fran?se

Is there anything I could do to correct that behaviour?

Thanks, R.

Robert:

It looks like you already got the header working in your French dictionary. The literal accented characters need to be replaced with their html codes for same, i.e.

Dictionnaire - 8e &eacute;dition - 1932 Acad&eacute;mie Fran&ccedil;aise

then properly displays

Dictionnaire - 8e édition - 1932 Académie Française

In future, if you want to create a .imp directly from your .html with running headers, just add these lines:
In <head> ... </head> section:<style type="text/css">
header {display:none; display:oeb-page-head}
</style>

and just after the <body> tag:<header>
<table border="0" width="100%">
<tr>
<td align="left"><small>Dictionnaire - 8e &eacute;dition - 1932</small></td>
<td align="right"><small>Acad&eacute;mie Fran&ccedil;aise</small></td>
</tr>
</table>
<hr>
</header>


Hope this helps others as well.

nrapallo
03-23-2009, 12:19 AM
Just fixed but not yet added to a full release:

Version 9.4c
(19 March 2009)

- NEW: Now implemented extradata MobiPerl processing for multibyteoverlap coded ebooks.
- FIX: Now helps retain ill-formed links. When trying to find a "home" for a filepos link, Mobi2IMP will be aggressive, despite bad placement, and scan forward up to 256 chars away from specified filepos location.
- NEW: Now better handles image (aspect-ratio) resizing and allows for the simultaneous sequential conversion to EBW1150 .imp and REB1200 .imp.
- NEW: Now can build a non-Sony .epub when the OEBFF (.oeb) GUI option is selected. Will cause the simultaneous creation of the .oeb ebook, but that .oeb can be deleted if the 'debug info' is selected (bug: not yet working).
- NEW: Allows the proper (functional) conversion of Feedbooks.com news feeds despite some quirks. Now can download RSS/news feeds in mobipocket format and convert them directly into .imp.
- NEW: Allows the proper (functional) conversion of Calibre news feeds despite some quirks. Now can download RSS/news feeds in mobipocket format and convert them directly into .imp.
- FIX: Now strip/blank out nulls and characters below ASCII 32, except chars 9 to 15. Also, remap some such chars to their HTML code equivalents. Now allows the converion of the MobileRead.com Mobipocket Download Guide as well as the Feedbooks.com Kindle Download guide into .imp.
- NEW: Now prints a summary of the .imp ebook/metadata info when done.

Fixed for now in Mobi2IMP.exe dos only (see Mobi2IMP-9.4c-dos.zip in post#1 (http://www.mobileread.com/forums/showthread.php?t=22178) above).

p.s. I will no longer change the GUI installer for minor bug fixes that do not change to GUI options screen. Instead, I will update only the Mobi2IMP.exe in the 'Mobi2IMP/bin' directory. Unzip the highest version number followed by a letter in post#1 above into the 'Mobi2IMP/bin' home directory overwriting the old .exe. At the next release, these files will be deleted!

nrapallo
04-02-2009, 08:47 PM
Just fixed but not yet added to a full release:

Version 9.4d (2 April 2009)

- FIX: Tweaked the image resizing to allow one line of text below the image i.e. a "caption".
- FIX: Allows proper handling of null (0) content EXTH data.

Fixed for now in Mobi2IMP.exe dos only (see Mobi2IMP-9.4d-dos.zip in post#1 (http://www.mobileread.com/forums/showthread.php?t=22178) above).

nrapallo
08-12-2009, 12:32 AM
Just fixed but not yet added to a full release:

Version 9.4e (11 August 2009)

- NEW: Now converts Mobipocket-specific tags like <div height="0em"> and <div width="0em"> to
<div style="margin-top:0em"> and <div style="text-indent:0em">.
Works for all tags like "<div " except "<img ". Thanks to Nate the great for the inspiration!
- FIX: Allows proper <p>, <div>, <ul>, <li> closing tags now. Thanks to Jellby for the tip!
- FIX: Re-tweaked the image resizing to better allow one line of text below the image i.e. a "caption".
- FIX: Now properly uses lowercase tags instead of depreciated UPPERCASE tags.

Fixed for now in Mobi2IMP-gui.exe and Mobi2IMP.exe only (see Mobi2IMP-9.4e.zip in post#1 (http://www.mobileread.com/forums/showthread.php?t=22178) above).

Roberts324
09-02-2009, 05:29 AM
Good work again, Nick, though I may use your nice software less and less: I have converted my eeePC 900 to an ebook reader, tweaked it with eeeRotate and miscellaneous readers, and I find the result is better than even the Ebookwise device, that I only use now for downloaded .imp texts...

nrapallo
09-02-2009, 06:18 PM
Good work again, Nick, though I may use your nice software less and less: I have converted my eeePC 900 to an ebook reader, tweaked it with eeeRotate and miscellaneous readers, and I find the result is better than even the Ebookwise device, that I only use now for downloaded .imp texts...

Thanks!

:whistle: Just to be still with us, in spirit, install eBook Publisher on your eeePC 900 and then make sure to download only REB1200 .imp ebooks... they ARE a joy to behold, even if you don't have a hardware REB1200 reader! :snicker:

As usual, the EBW1150 is over-shadowed by it's big-brother... :rolleyes:

shighfield
09-03-2009, 10:39 AM
As usual, the EBW1150 is over-shadowed by it's big-brother... :rolleyes:

But the big brother is just so hard to buy.

DaleDe
09-08-2009, 01:19 PM
Good work again, Nick, though I may use your nice software less and less: I have converted my eeePC 900 to an ebook reader, tweaked it with eeeRotate and miscellaneous readers, and I find the result is better than even the Ebookwise device, that I only use now for downloaded .imp texts...

If you download ebook publisher there is a reader in it that can read IMP on your eeePC if it is running windows.

Dale

Chauncey
11-18-2009, 08:27 AM
Is it possible to get full screen images on my ETI2? no matter how large the image actually is reduced to between 1/2 to 1/4 screen size. LOL What am I doing wrong?

nrapallo
11-18-2009, 09:27 AM
Is it possible to get full screen images on my ETI2? no matter how large the image actually is reduced to between 1/2 to 1/4 screen size. LOL What am I doing wrong?

What is the size of the images in your source .prc ebook? Is it available here in our E-Books upload forum?

Mobi2IMP will reduce images larger than the screen size (about 319x446), but will not enlarge smaller ones to screen size.

If there are a few of them and you want to see them "full size", then you can hand edit the exploded .html to include width and height specifiers in the <img> tag i.e. <img src="..." width="320" height="480">. Try numbers that retain the original's aspect ratio. A good rule of thumb is that if you double the width, then double the height used as well. Experiement.

Then just load the .opf in eBook Publisher and rebuild your .imp.

shighfield
04-25-2010, 03:54 PM
Nick... Is there a way to get mobi2imp to convert with the graphics that are in the .mobi file? For some reason it keeps stripping them out.

nrapallo
04-25-2010, 06:20 PM
Nick... Is there a way to get mobi2imp to convert with the graphics that are in the .mobi file? For some reason it keeps stripping them out.

Mobi2IMP "converts" the following images formats: .jpeg/.jpg, .gif, .png into resized versions of the same image format.

Unfortunately, it doesn't convert any other images formats, like .bmp, .wmf, etc. that may appear in the a .mobi file.

In that case, see if you can manually convert the non-spupported images' format into a .jpg, .gif or .png and re-build your ebook using eBook Publisher and the exploded directory left behind by Mobi2IMP. Be sure to also change the non-supported image filename extention to .jpg, .gif, or .png where it was referenced in the extracted .html, if any.

If that fails, PM me.

shighfield
04-26-2010, 03:55 PM
That did the trick Nick. They were in .GIF format, I did a mass conversion to .JPG and recreated the MOBI file in creator and it converted it back to an IMP perfectly. (Didn't want to use Bookdesigner as it makes the pictures look bad and this is a autobiography of Slash).