View Single Post
Old 02-24-2008, 10:27 PM   #4
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by nrapallo View Post
Mobi2imp (version 9) with windows executable now out! (See post #3 in the Fictionwise forum sticky)
Mini-tutorial follows:

The mobi2imp.exe needs to be run from within an already opened Dos box i.e. command prompt and then only needs two arguments "My Source.prc" and "Explode Dir". If there are any spaces, then you need to surround them with quotes. Don't double-click the .exe directly nor the .pl; it is best run from within a batch file (see below)

You can also specify 'Category' (like Fiction) 'Author' or 'Title'.

Try this:
Code:
c:\> mobi2imp.exe --verbose "My Source.prc" "Explode Dir" Fiction
If you want to automate this, try running a batch file (just copy and paste this into a file called 'prc2imp.bat')
Code:
@echo off
rem Convert .mobi/.prc to .imp process devised by Nick Rapallo (Jan. 2008)
rem =============================================
rem Start the conversion of all .prc files in this directory to .imp format
rem For GEB 1150/EBW 1150 only output; add switch '--1200' for REB 1200 .IMP

for %%i in (*.prc)  do mobi2imp.exe --verbose "%%i" "%%~sni"
for %%i in (*.mobi) do mobi2imp.exe --verbose "%%i" "%%~sni"
for %%i in (*.pdb)  do mobi2imp.exe --verbose "%%i" "%%~sni"

rem That's it! We are now finished the conversion of all .prc files
echo WoW! All done.
pause
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!)

Also, options like 'margins' and 'text-justification' can be better controlled in the mobi2imp via command-line '--options'. Popular options are:
'--out IMPFILENAME' set .IMP filename to use (overrides default naming)
'--smallerfont' use 'x-small' font size for body text like pre-fix BD not default 'small'
'--nojustify' no full justification (i.e. left-aligned) not 'justify'
'--nopara' use no paragraph separation not 'blank line' (1em) separation
'--indent' use small (1em) indent instead of no (0em) indent
These options (sometimes called switches) go just after mobi2imp.exe and ALWAYS start with two dashes (i.e. '--verbose'). Just forget about getting the .pl and ActiveState Perl setup working. With the .exe, you don't even need ActiveState Perl!

With mobi2imp, just beware that you're stuck with any inconsistencies (if any) introduced by the .prc/.mobi original when converting over. However, 'mobi2imp' also creates a .opf that can be loaded into eBook Publisher and from there you can further edit/build it.

All in all, I like the output of mobi2imp.

I have been converting Madam Broshkina's .prc posts (with her permission) using mobi2imp.exe. For one I did recently, I used this command-line (in a batch file):
Code:
mobi2imp.exe --1200 "Authors Various_The Worlds Greatest Books Volume V.prc" "AUTHOR5" Fiction "Authors, Various" "The Worlds Greatest Books Vol 5"
Download the "Authors Various_The Worlds Greatest Books Volume V.prc" and see if you can duplicate the .IMP posted for the same ebook with the above command.

p.s. Thanks to DaleDe there is now a wiki entry for mobi2imp here
Attached Files
File Type: bat prc2imp.bat (603 Bytes, 1638 views)

Last edited by nrapallo; 03-07-2008 at 01:39 PM. Reason: added 'prc2imp.bat' batch file as an attachment!
nrapallo is offline   Reply With Quote