07-22-2011, 01:01 PM | #91 | |
The Grand Mouse 高貴的老鼠
Posts: 71,900
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
I would have thought that making them all lists was actually quite a simple and clean solution, even if most of them end up as a list of just one item. Surely python handles single item lists fairly efficiently? |
|
07-22-2011, 01:02 PM | #92 |
The Grand Mouse 高貴的老鼠
Posts: 71,900
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
|
Advert | |
|
07-22-2011, 01:12 PM | #93 |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
I'm thinking about redirecting the "Info:", "Warning:" and "Error:" output lines to stderr instead of stdout. Any thoughts on that?
Ciao, Steffen |
07-22-2011, 03:13 PM | #94 | |
The Grand Mouse 高貴的老鼠
Posts: 71,900
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
[EDIT: I see KevinH does have a good reason for not redirecting these.] Last edited by pdurrant; 07-22-2011 at 03:25 PM. Reason: Reading KevinH's post below |
|
07-22-2011, 03:21 PM | #95 | |
Sigil Developer
Posts: 7,878
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Hi,
Quote:
This is done to support a front-end gui program that invokes this python script via a python subprocess library so that any progress or errors/ warnings are shown in the gui log window in real time. For people with Python properly installed, they can double-click on the MobiUnpack.pyw program and use simple gui elements to run the program. This is much easier for some people. Please see MobiUnpack.pyw from the google-code site I pointed you at earlier or I can post it for you if you like. Thanks, Kevin |
|
Advert | |
|
07-22-2011, 04:22 PM | #96 | |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
By separating stdout and stderr the gui could ignore the stdout messages completely (or use them to show a progress bar instead) and only messages on stderr would be displayed in the log window, as they indicate something unusual the user should be aware of. Ciao, Steffen |
|
07-22-2011, 04:40 PM | #97 |
Sigil Developer
Posts: 7,878
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Hi,
On many systems stderr is always automatically unbuffered io. This is true for Mac OS X and Linux but I am not sure about Windows. But you typically read them from separate pipes and can get "out of order" conditions that can be confusing to the user (ie. should you read and print the stderrr or stdout first when both pipes have data waiting). There might be a way to pipe them both to the same output when invoking the script via subprocess but that is typically OS dependent.. It is simply easier to keep everything going to stdout so that progress and any error messages can be seen in the log window which makes it nice/easy for bug reports from users who use the gui program that exists for them. Thanks, Kevin ps. Here is the full tool set with the gui in case you want to modify or change it. It is very simplistic and meant to be basically independent of the underlying python script it invokes to the extent possible. If python is in your path, you should be able to unzip and then double-click on MobiUnpack.pyw or MobiM22HTML.pyw and run the scripts (stored in the lib) Last edited by KevinH; 07-22-2011 at 04:48 PM. |
07-23-2011, 10:25 AM | #98 |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
mobiunpack 0.29
Hi,
here is mobiunpack.py version 0.29 with the following changes:
mobiunpack_0.29.zip Ciao, Steffen |
07-23-2011, 10:58 AM | #99 | |
The Grand Mouse 高貴的老鼠
Posts: 71,900
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
|
|
07-23-2011, 11:04 AM | #100 |
Sigil Developer
Posts: 7,878
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Hi Steffen,
I didn't notice metadata 404 anyplace in the code which I think is the Text To Speech (TTS) flag. We might want to add that so that people can see whether this is enabled or not. Thanks for your great work on this. Kevin |
07-23-2011, 11:07 AM | #101 | |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
And multiple authors worked for me. Ciao, Steffen |
|
07-25-2011, 02:38 PM | #102 |
The Grand Mouse 高貴的老鼠
Posts: 71,900
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Now copied back to my post on the first page of the thread: https://www.mobileread.com/forums/sho...36&postcount=5
|
07-26-2011, 04:19 AM | #103 |
Enthusiast
Posts: 41
Karma: 12
Join Date: Jul 2009
Device: ppc
|
I tried every version one by one, and get happier then. 0.29 is better in many ways.
For the better, I report just bad result here. words reflection works, but javascript function does not, pop error after mobi back using mobigen. most images work, but some warnings about invalid images come out when using the 0.29 rendered and untouched opf by mobigen. |
07-26-2011, 04:38 AM | #104 | ||
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
If someone finds out what needs to be changed I might fix it. Quote:
Ciao, Steffen |
||
07-26-2011, 04:39 AM | #105 | |
Developer
Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Quote:
Ciao, Steffen |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can i rotate text and insert images in Mobi and EPUB? | JanGLi | Kindle Formats | 5 | 02-02-2013 04:16 PM |
PDF to Mobi with text and images | pocketsprocket | Kindle Formats | 7 | 05-21-2012 07:06 AM |
Mobi files - images | DWC | Introduce Yourself | 5 | 07-06-2011 01:43 AM |
pdf to mobi... creating images rather than text | Dumhed | Calibre | 5 | 11-06-2010 12:08 PM |
Transfer of images on text files | anirudh215 | 2 | 06-22-2009 09:28 AM |