View Single Post
Old 02-18-2008, 07:35 AM   #278
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
Mobi2imp - version 6 ready for Mobiperl distribution

Quote:
Originally Posted by nrapallo View Post
tompe:

I updated mobi2imp.pl from version 2 (included in the Mobiperl v0.0.31 distribution) to version 4. Please include this version for any future distribution.

Things that changed:
- Now better indicates that eBook Publisher must be installed first.
- now takes '--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 '--1150' is specified, then the EBW 1150 .IMP version is NOT created.
I am just learning about POD documentation, so haven't done anything yet for 'mobi2imp'.

-Nick
tompe:

I updated mobi2imp.pl from version 2 (included in the Mobiperl v0.0.31 distribution) to version 6. Please include this version for any future distribution.

Things that changed:

version 4:
- 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:
- now allow 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 '--largemargins' (5%), '--hugemargins' (8%) and even '--nomargins' (0%)
- you can change the default text-align from justify to '--nojustify' (left aligned).
- further to Kovidgoyal's recent 'mobi2oeb' post, now can output in OEBFF (.oeb) output.
As a result, the output can be any and all at once of: '--1150' .IMP, '--1200' .IMP, '--1100' .rb and '--oeb' OEBFF!

version 6:
- 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 for your suggestion here)!


To run this program, I normally use a windows batch file, like:
Code:
@echo off
rem Example batch file that can be used to procees many files at once.
rem [Category Author Title] are all optional, with same being extracted from source file.
rem ExplodeDir = . means use current directory, but not useful for multiple files.
rem add the switch --OEB, --1200, --1100 to simutaneously create these versions along with 1150 .IMP
rem add the switch --1150 to conversly not create the 1150 version
rem add the switch --nomargins, --tinymargins --largemargins, --hugemargins to set left-right margins to 0%, 2px, 5% and 8% respectively
rem add the switch --smallerfont, --largerfont, --nojustfiy to use 'x-small', 'medium' font size or no full justification
rem
rem               Source                    ExplodeDir     [Category  Author             Title]
rem               ======                    ==========      ========  ======             =====
rem perl mobi2imp.pl "Oliver Twist.prc"         Oliver      Classics "Dickens, Charles" "Oliver Twist"
rem perl mobi2imp.pl "Alice_In_Wonderland.mobi" Alice       Classics "Carroll, Lewis"   "Alice In Wonderland"
rem perl mobi2imp.pl "Alice_In_Wonderland.mobi" .
rem 
rem mobi2imp.exe --oeb  --smallerfont  "Alice_In_Wonderland.mobi" Alice
rem mobi2imp.exe --1200 --largerfont  --tinymargins    "Oliver Twist.prc"         Oliver

mobi2imp.exe SpaceEncyclopedia.mobi Space
mobi2imp.exe --smallerfont --largemargins "Alice_In_Wonderland.mobi" Alice
mobi2imp.exe --nojustify   --nomargins    "Oliver Twist.prc"         Oliver
pause
-Nick
Attached Files
File Type: pl mobi2imp.pl (19.4 KB, 516 views)

Last edited by nrapallo; 02-18-2008 at 12:36 PM. Reason: forgot to address this to tompe!
nrapallo is offline   Reply With Quote