![]() |
#1 |
Publisher
![]() 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 |
![]() |
![]() |
![]() |
#2 |
reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,977
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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Publisher
![]() 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? |
![]() |
![]() |
![]() |
#4 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
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.
|
![]() |
![]() |
![]() |
#5 |
Publisher
![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
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.
|
![]() |
![]() |
![]() |
#7 |
Publisher
![]() 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. |
![]() |
![]() |
![]() |
#8 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,064
Karma: 144284144
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Publisher
![]() 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. |
![]() |
![]() |
![]() |
Tags |
mobigen |
|
![]() |
||||
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 |