MOBI2MOBI(1)

NAME
mobi2mobi - A program to manipulate mobi files

SYNOPSIS
mobi2mobi file.mobi

mobi2mobi file.prc

mobi2mobi --outfile out.mobi --prefixtitle "01-" file.mobi

DESCRIPTION
A program to manipulate MobiPocket files. Author and title can be set and a cover image (also thumb nail image for Gen3) can be added.

There are two kind of prc files used for electronic books. One is a PalmDOC file which does not have a MOBI header but can contain HTML code marked up with MobiPocket specific markup and it can be read by a MobiPocket reader. For this format you cannot store meta information in the header. The other format is MobiPocket and it has a MOBI header and some additional data where you can store meta information and an extended title.

This program can change the extended title for a MobiPocket file. It can also automatically convert a PalmDOC file to a MobiPocket file and set the title.

It can also add author information to a PalmDOC file by converting it to a MobiPocket file and set the author meta information. It can also change or set the author information for a MobiPocket file.

You can also add a prefix to a title in a MobiPocket file. This does not work for PalmDOC files.

It is possible to add an image to the file. If there are no other images in the file then the added image will be used as cover image and thumb nail image for Cybook Gen3. You can also replace the cover image if it already exists.

Just running the program on a mobifile without any flags will print some information about the file.

Since there is no specification available for the MOBI header this program might generate books that are not entirely correct. So keep the original files...

OPTIONS

--databasename NAME
    Change the internal database name of the file (the first 31 characters in the file). This may be useful in conjunction with the oeb:redirect tag when creating mobi-format ebooks.

--mbpfile FILE
    Use the author and publisher info in the mbp file and set these in the outfile. --author and --publisher overrides this information.

--title TITLE
    Change the the title of the book.

--prefixtitle prefix
    Add a prefix to the title of the book.

--author AUTHOR
    Set the author of the book.

--addauthor AUTHOR
    Add another author of the book.

--publisher PUBLISHER
    Set the publisher of the book.

--description DESCRIPTION
    Set the description of the book.

--subject SUBJECT
    Set the subject of the book. Can currently only set one subject.

--language LANGUAGE
    Set the language of the book. LANGUAGE should be a string like "en-gb" or a number like 2057.

--addthumbnail IMAGEFILE
    Add an image that will be used as thumbnail image. If there already is a thumb nail image it will be replaced. The only way for it to be a thumb nail image is if the thumb offset is specified in the EXTH data.

--coverimage IMAGEFILE
    Set the cover image of a book. If there already is a cover image it will be replaced. The only way for it to be a cover image is if the cover offset is specified in the EXTH data.

--savecover FILENAME
    Save the cover image if it exists. If filename is given without extension the correct extension will be added.

--savethumb FILENAME
    Save the thumb nail image if it exists. If filename is given without extension the correct extension will be added.

--fiximagesizes
    Fix image sizes so that they are less then 61000 bytes and rescale so they work on the Gen3.

--gen3imagefix
    Fix image sizes so that they are less then 61000 bytes and rescale so they work on the Gen3.

--coveroffset OFFSET
    Change the offset of the cover image so it points to another image.

--exthtype TYPE
    The type of the EXTH item you want to change. This is the name of the type and the names can be found in MobiPerl/EXTH.pm.

--addexthtype TYPE
    Add another EXTH entry. TYPE is the name of the type and the names can be found in MobiPerl/EXTH.pm.

--delexthtype TYPE
    Delete all entries in EXTH with type TYPE. TYPE is the name of the type and the names can be found in MobiPerl/EXTH.pm.

--delexthindex INDEX
    Specify that --delexthtype should not delete all items of the type TYPE but just delete the first one if INDEX is 1 and the second one if INDEX is 2 and so on.

--exthdata TYPE
    The data of the EXTH item you want to change.

--outfile FILENAME
    Specifies an output file. Only when this flag is given is any conversion done.

--imagerescale 0|1
    Default is rescaling images for them to work on Cybook Gen3. To disable this specify --imagerescale 0.

--allowtts
    Allow text to speech to be used (for Kindle books).

--deleteclippinglimit
    Remove the clipping limit (for Kindle books).

EXAMPLES
   mobi2mobi file.mobi

   mobi2mobi --outfile out.mobi --prefixtitle "01-" file.mobi

   mobi2mobi --outfile out.mobi --title "Correction of title" file.mobi

   mobi2mobi --addthumbnail cover.jpg --outfile out.mobi file.mobi

TODO
   - Functionality to change or add other meta information then author.

BUGS
   - according to the Mobilread thread there is some problem with DRM:ed
     files...

AUTHOR
Tommy Persson (tpe@ida.liu.se)