Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 07-24-2009, 07:55 AM   #1
UniversalisPub
Publisher
UniversalisPub began at the beginning.
 
UniversalisPub's Avatar
 
Posts: 8
Karma: 10
Join Date: Jul 2009
Device: none
Mobigen return codes / error indications?

We publish Universalis, an application that lets you read content directly and can also export it in ePub format. I'd like to extend this so that it exports Mobipocket format also.

I have tried everything by hand, and the workflow "1. Export lightly-seasoned ePub. 2. Run Mobigen on it" works perfectly.

Human beings, however, do not do command lines or directories or command-line utilities, so for them the workflow needs to be automated into a single menu choice, just as we have already done for the ePub format.

My question is: is there an easy way of telling whether a particular mobigen.exe run has succeeded or not, without forcing the user to read and understand all its messages?

For example, is it guaranteed that if an error occurs, a .mobi file will definitely not be created? In that case we could take non-existence of the output file as the error indicator, and if the output file indeed doesn't exist, we can tell the user to read the log to see what happened.

Or perhaps a return code indicates whether or not an error has occurred?

Last edited by UniversalisPub; 07-24-2009 at 07:58 AM. Reason: Clearer title
UniversalisPub is offline   Reply With Quote
Old 07-24-2009, 09:27 AM   #2
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
If the MOBI is always DRM-free, then Calibre is better than mobigen at ePub to MOBI fomat shifting. With the 0.6 version you will also be able to convert to many other formats. If you get an error with mobigen your only realistic option is to change the input ePub to work around it, with Calibre you can report the bug and get is fixed quickly. I don't know how good Calibre's command line error reporting is though.
wallcraft is offline   Reply With Quote
Old 07-25-2009, 02:25 AM   #3
UniversalisPub
Publisher
UniversalisPub began at the beginning.
 
UniversalisPub's Avatar
 
Posts: 8
Karma: 10
Join Date: Jul 2009
Device: none
Perhaps I didn't make the workflow clear.

No-one creates the intermediate ePub file. Our program creates it automatically, so it's easy for us to make sure that it's correct. If there's anything wrong with the workflow then we want to know about it so that we can update our program.

No-one runs mobigen. Our program does it automatically and the user never sees it happen.

No doubt a similar workflow could be set up with Calibre, but the same question would need to be asked: how do we know, programmatically, whether a given conversion has worked or not?
UniversalisPub is offline   Reply With Quote
Old 07-25-2009, 04:10 AM   #4
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Presumably you're running Mobigen programmatically. Could you not simply pipe the output into a file and parse the results? Or have you checked the process exit code? Normally, programs return an exit code of "0" on success, and non-zero on failure.
HarryT is offline   Reply With Quote
Old 07-25-2009, 11:36 AM   #5
UniversalisPub
Publisher
UniversalisPub began at the beginning.
 
UniversalisPub's Avatar
 
Posts: 8
Karma: 10
Join Date: Jul 2009
Device: none
Thanks, Harry, I was hoping to get some sort of official answer, but I've experimented, and for anyone else who has the same question, the return code seems to be 0 for success, 1 for warnings, and 2 for errors.
UniversalisPub is offline   Reply With Quote
Old 07-25-2009, 12:00 PM   #6
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
That's useful information. Thank you for sharing it with us.
HarryT is offline   Reply With Quote
Old 07-25-2009, 01:00 PM   #7
UniversalisPub
Publisher
UniversalisPub began at the beginning.
 
UniversalisPub's Avatar
 
Posts: 8
Karma: 10
Join Date: Jul 2009
Device: none
The whole thing works brilliantly. The app has a "save to ePub" command, which works directly, and a "save to Mobipocket" command, which appears to work directly but actually creates a modified ePub file and runs it through mobigen.exe.

The user has to download mobigen.exe and copy it into our program folder because the Mobigen people won't let it be redistributed directly.

By the way, timings and file sizes on a 217KB ePub file were:

Mobigen (normal) - 8 seconds for a 394KB .mobi file.
Mobigen (high) - 25 seconds for a 142KB .mobi file.
Calibre - 100 seconds for a 527KB .mobi file.

Last edited by UniversalisPub; 07-26-2009 at 08:24 AM.
UniversalisPub is offline   Reply With Quote
Old 07-25-2009, 10:43 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by UniversalisPub View Post
The whole thing works brilliantly. The app has a "save to ePub" command, which works directly, and a "save to Mobipocket" command, which appears to work directly but actually creates a modified ePub file and runs it through mobigen.exe.

The user has to download mobigen.exe and copy it into our program folder because the Mobigen people won't let it be redistributed directly.

By the way, timings and file sizes on a 700KB ePub file were:

Mobigen (normal) - 8 seconds for a 394KB .mobi file.
Mobigen (high) - 25 seconds for a 142KB .mobi file.
Calibre - 100 seconds for a 527KB .mobi file.
Which version Calibre? If it's not 0.6.0 then you need to specify the --compress option or the resulting file comes out uncompressed.
JSWolf is offline   Reply With Quote
Old 07-26-2009, 03:27 AM   #9
UniversalisPub
Publisher
UniversalisPub began at the beginning.
 
UniversalisPub's Avatar
 
Posts: 8
Karma: 10
Join Date: Jul 2009
Device: none
It was 0.6.0, run from the GUI.

ePub file: 217KB
mobigen, high compression: 215KB
mobigen, normal compression: 452KB
Calibre, compression turned on: 1 min 41 sec, 526KB.
Calibre, compression turned off: 1 min 29 sec, 1395KB.

With larger files, mobigen.exe starts to perform a bit better relative to ePub. For example:

ePub file: 849KB
mobigen, high compression: 536KB
mobigen, normal compression: 1520KB
Calibre, compression turned on: 1950KB

ePub file: 9680KB
mobigen, high compression: 4640KB
mobigen, normal compression: 17900KB
Calibre, compression turned on: not tested

Last edited by UniversalisPub; 07-26-2009 at 09:19 AM. Reason: Added more figures.
UniversalisPub is offline   Reply With Quote
Reply

Tags
mobigen


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
LED error codes and battery error ThR iRex 2 04-08-2009 09:16 AM
Mobigen Mobigen (KindleCreator) for Linux now available wallcraft Kindle Formats 31 03-17-2009 12:32 AM
Old Version Mobigen needed wilko10 Kindle Formats 11 11-25-2008 08:10 PM
Does someone still have Mobigen 6.01 build 37? IceHand Kindle Formats 7 03-03-2008 05:04 PM
MobiPocket TOC using mobigen wallcraft Reading and Management 4 12-07-2007 09:45 AM


All times are GMT -4. The time now is 01:20 AM.


MobileRead.com is a privately owned, operated and funded community.