Mobi2imp

From MobileRead
Jump to: navigation, search
Mobi2IMP GUI 9.4

Mobi2IMP is built on Mobiperl to add direct conversion from MOBI files to IMP files.

Contents

[edit] Overview

After installing Mobi2IMP 9.4 using the Windows installer, you can use the new Windows GUI instead of using the dos/command prompt or perl script. Just select your Input filename, Input format, Output Options (if any), and then click Convert. After done review the contents of the dos window then press any key to exit.

This started as a Perl module for building eBooks. It is available as both a Perl source file (mobi2imp.pl) and a Windows GUI executable (Mobi2IMP Installer) starting from version 9.1. It was created by Nick Rapallo based on Mobiperl code written by Tommy Persson and PDFRead's .IMP creating module (ImpOutput) by Ashish Kulkarni. A copy of eBook Publisher must be installed on the PC or Mac for this to work.

For Windows users, there is also a Windows executable, mobi2imp.exe that can be used, at the Command/Dos Prompt, without any other supporting files. Of course, for Linux/Mac users, Perl itself and some add-on modules must also be installed.

[edit] Usage

The mobi2imp.exe can be run from within an already opened CMD box i.e. command prompt and then only needs twoone argument "MobiSource.prc" and "ExplodeDir". 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 Example uses and Mini-tutorial below)

  Usage: Mobi2IMP [options] MobiSource ExplodeDir [Category [Authorname [Title]]]

The following options are supported (case sensitive):

  --verbose to printout messages about this conversion
  --debug to printout more detailed messages about conversion

Output related:

  --explodedir DIR set 'ExplodeDIR' to use instead of default 'Filename'
  --out IMPFILENAME to set .IMP filename to use (overrides default naming)
  --OEB, --1200, --1100 to simultaneously create these versions along with 1150 .IMP.
    (Note the 1100 will have a RB extension and the OEB option creates .oeb.)
  --1150 to conversely not create the 1150 version
  --cover add cover page using the existing cover embedded in MobiSource

Style related:

  --LRmargins LR set left-right margins to LR=2px,5%,8% not default 2%
  --nomargins set left-right margins to 0% instead of default 2%
  --smallerfont, --largerfont to use 'x-small', 'medium' font size for the
    base font instead of default 'small'
  --nojustfiy to use no full justification (i.e. left aligned) not default 'justify'
  --nopara to use no paragraph separation not default 'blank line' (1em) separation
  --indent to use small (1em) indent instead of default no (0em) indent
  --bgcolor #FF80FF to use color #FF80FF as background color for every page instead
    of default #FFFFFF
  --header_hr use header text 'Title Author' followed by 'hr'
  --header_color #FF80FF use color #FF80FF as header background color only & no 'hr'

HTML/BD Fixes:

  --BDbig to make BookDesigner notice at the end 'big print' not default 
    'small print'
  --BDnewpage to put BookDesigner notice at the end on a newpage
  --BDremove to remove BookDesigner notice at the end
  --noBRfix when using '--nopara', don't fix (broken) br's issue
  --noimagefix do not pad/resize images to device's aspect ratio
  --noimagelinkfix leave image link locations/blank lines before captions

Required parameters: MobiSource ExplodeDir

  MobiSource is the mobipocket (.mobi/.prc) or palmdoc (.pdb) file to convert 
     to .IMP formats
     if it contains spaces, then surround with quotes (i.e. "My Source.prc")
  [now --explodedir is directory where to explode mobi file (left behind!)
     can also be "." for current directory]

Optional parameters: [Category [Authorname [Title]]]

  Are all optional; with same being extracted from source file, if present.  Strips underscores in Title, if any.

If Build successful, then default .IMP filename is Author - Title.ext
If Build method fails to create ebook, load .opf and manually Build it!
If resulting .IMP is wrong version in viewer, just re-install eBook Publisher!

[edit] Example uses (using command-line; not GUI)

Where Category, Author and/or Title are explicitly provided for (overrides .prc/.mobi metadata):

  Command      --Options   Source                     ExplodeDir [Category [Author            [Title]]]
  mobi2imp.exe --verbose   "Oliver Twist.prc"         Oliver     Classics  "Dickens, Charles" "Oliver Twist"
  mobi2imp.exe --debug     "Alice_In_Wonderland.mobi" Alice      Classics  "Carroll, Lewis"
  mobi2imp.exe --1200      SpaceEncyclopedia.mobi     .          Reference

Where Category, Author and Title are not provided since all extracted from .prc/.mobi metadata:

  Command      --Options                   Source                      ExplodeDir
  mobi2imp.exe --smallerfont --nomargins   SpaceEncyclopedia.mobi      Space
  mobi2imp.exe --oeb --smallerfont         "Alice_In_Wonderland.mobi"  Alice
  mobi2imp.exe --nojustify --tinymargins   "Oliver Twist.prc"          Oliver
  mobi2imp.exe --smallerfont --nomargins   SpaceEncyclopedia.mobi      Space
  mobi2imp.exe --largerfont --nopara       "Alice_In_Wonderland.mobi"  Alice
  mobi2imp.exe --nopara --indent           "Oliver Twist.prc"          Oliver
  mobi2imp.exe -oeb -out "Space Reference" SpaceEncyclopedia.mobi      Space
  mobi2imp.exe -1100 --bgcolor #FF80FF     "Alice_In_Wonderland.mobi"  Alice
  mobi2imp.exe -1200 --nopara -noBRfix     "Oliver Twist.prc"          Oliver

[edit] Tutorials

Mini-tutorial Quick and dirty tutorial on how to use Mobi2IMP to convert all .prc's in a directory to .IMP formats.

[edit] For more information

Download the latest version of Mobi2IMP here - The Windows GUI executable/installer (in the .zip) is all you need.

Development Hub repository of Mobi2IMP

MobileRead thread other perl scripts that are useful for IMP files are also covered in this thread.

Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox