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-02-2014, 10:37 AM   #856
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi tkeo,

Quote:
Originally Posted by tkeo View Post
Hi Kevin,
I have books in which idrefs have meaningful names, for example: p-cover, p-titlepage, p-caution, p-copyright.
Indeed they do not improve functionality, but is it not enough for reason to keep them?

Thanks,
I found a public wifi site and saw your post.

They need not be meaningful and most are not. That said, as a compromise, how about the following:

1. since their idrefs must be unique for them simply add a very short prefix to theirs such as "x_" or some other short prefix (this is guaranteed to keep theirs unique). This will also guarantee that their idrefs do not overlap with our itemXXXXX idrefs.

2. Remove all of the "set" code and unique id code and simply replace it all with something similar to the following pseudo code.

Code:
idref_to_use = "item%05s" % refnum
if their_old_idref[refnum]:
    idref_to_use = "x_" + their_old_idref[refnum]
Or something similar to that in meaning.

This guarantees uniqueness, allows you to see the meaningful names but is so simple no block of uniqueness code is needed making the code as simple as possible.

How does that sound?

KevinH

Last edited by KevinH; 07-02-2014 at 10:43 AM.
KevinH is online now   Reply With Quote
Old 07-03-2014, 09:06 AM   #857
tkeo
Connoisseur
tkeo began at the beginning.
 
Posts: 94
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
Hi Kevin,

Quote:
Originally Posted by KevinH View Post
They need not be meaningful and most are not. That said, as a compromise, how about the following:

1. since their idrefs must be unique for them simply add a very short prefix to theirs such as "x_" or some other short prefix (this is guaranteed to keep theirs unique). This will also guarantee that their idrefs do not overlap with our itemXXXXX idrefs.

2. Remove all of the "set" code and unique id code and simply replace it all with something similar to the following pseudo code.

This guarantees uniqueness, allows you to see the meaningful names but is so simple no block of uniqueness code is needed making the code as simple as possible.

How does that sound?
It is good.
I am glad for your cooperation.

Take care,
tkeo
tkeo is offline   Reply With Quote
Advert
Old 07-03-2014, 02:11 PM   #858
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
Can someome please post a new version of KindleUnpack that has the patches applied to 0.27f? Thanks. Yes, I have found .27f failed with an error and I'd like to see if the patches fix this.
JSWolf is offline   Reply With Quote
Old 07-04-2014, 08:44 AM   #859
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,550
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
Can someome please post a new version of KindleUnpack that has the patches applied to 0.27f? Thanks. Yes, I have found .27f failed with an error and I'd like to see if the patches fix this.
Post as much detail about the error as you can, Jon. And if you can't post an out-of-copyright file that can reproduce the error, at least point to a commercial book that can.

Also keep in mind that if the drm-free book in question has been altered (after the fact) by any third-party utilities before using KindleUnpack (other than perhaps core calibre features), there's no guarantees that KindleUnpack will be able to accommodate any issues said utilities might introduce.

Remember, KindleUnpack is mainly about reverse engineering kindlegen's drm-free output. A little variance between that and calibre's output is accommodated wherever possible, but if something else has diddled the binary mobi/kf8 (after it became drm-free)... all bets are off.
DiapDealer is offline   Reply With Quote
Old 07-04-2014, 12:04 PM   #860
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 DiapDealer View Post
Post as much detail about the error as you can, Jon. And if you can't post an out-of-copyright file that can reproduce the error, at least point to a commercial book that can.

Also keep in mind that if the drm-free book in question has been altered (after the fact) by any third-party utilities before using KindleUnpack (other than perhaps core calibre features), there's no guarantees that KindleUnpack will be able to accommodate any issues said utilities might introduce.

Remember, KindleUnpack is mainly about reverse engineering kindlegen's drm-free output. A little variance between that and calibre's output is accommodated wherever possible, but if something else has diddled the binary mobi/kf8 (after it became drm-free)... all bets are off.
But since there are patches made to the version I have, then the version I have is no longer useful for testing. I need a version with the patches applied to test this eBook otherwise, any testing I do is invalid.
JSWolf is offline   Reply With Quote
Advert
Old 07-04-2014, 11:13 PM   #861
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,550
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
But since there are patches made to the version I have, then the version I have is no longer useful for testing. I need a version with the patches applied to test this eBook otherwise, any testing I do is invalid.
Not having a version with the latest proposed patches applied is not preventing you from stating the nature/details of the error you're getting with the .72f version of KindleUnpack.
DiapDealer is offline   Reply With Quote
Old 07-05-2014, 02:14 AM   #862
tkeo
Connoisseur
tkeo began at the beginning.
 
Posts: 94
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
Hi,

Quote:
Originally Posted by JSWolf View Post
But since there are patches made to the version I have, then the version I have is no longer useful for testing. I need a version with the patches applied to test this eBook otherwise, any testing I do is invalid.
The patchs I have posted do not fix any fatal errors. They are a minor bug fix of cover page renaming and code cleanups. So please test with v0.72f.

Thanks,
tkeo is offline   Reply With Quote
Old 07-05-2014, 08:10 AM   #863
tkeo
Connoisseur
tkeo began at the beginning.
 
Posts: 94
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
KindleUnpack v0.72g and v0.72h

EDIT: Attached files are removed. The changes presented in them will be made after discussions in future version.

Hi,

I have modified KindleUnpack v0.72f. I have made two versions. Both versions include the patches I have posted and do not have functional changes from them if no bugs.
The purpose of them are to reduce the degree of redundancy and to make easier to understand.

The difference of v0.72h from v0.72g is that the spine information retrieved from RESC is passed by a parameter of OPFProcessor() instead of getting correspondences between filenames and idrefs/attribs in the spine inside the OPFProcessor(). To do so, the parameter filenames is changed to fileinfolist which is the list consist of [dir, filename, idref, attribs]. I think it is easier to understand.

Thanks,

Last edited by tkeo; 07-08-2014 at 09:14 AM.
tkeo is offline   Reply With Quote
Old 07-05-2014, 08:25 AM   #864
tkeo
Connoisseur
tkeo began at the beginning.
 
Posts: 94
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
Hi Kevin,

I have moved adding metadataguidetext to guide for print replica books from mobi_opf.py to kindleunpack.py. Please confirm it is proper for simplification.

I have removed and commented out unnecessary code as possible. Further simplification of the code may be possible. I think we will do it after replacing mobi_k8resc.py to simplified version.

Take care,
tkeo
tkeo is offline   Reply With Quote
Old 07-05-2014, 09:17 AM   #865
tkeo
Connoisseur
tkeo began at the beginning.
 
Posts: 94
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
Hi Kevin,

Sorry, I missed to look at this post.
I will chage in future posts.

Quote:
Originally Posted by KevinH View Post
In an effort to help track down other mistakes like that, I have changed the entire code base to use the python.org PEP recommendation when testing against None as follows:

I have changed all:
== None
to:
is None

And changed all:
!= None
to:
is not None

Now any testing against 0 vs non-zero using "if variable" will stand out as different and I can track down any such occurrences to make sure they were not using it to test against None but were instead looking at the non-zero case.

I have attached a patch to move us to follow the python PEP recommendation.
See pep_use_patch.txt

Last edited by tkeo; 07-06-2014 at 06:25 AM. Reason: fixed typo.
tkeo is offline   Reply With Quote
Old 07-05-2014, 03:45 PM   #866
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
In order to test the latest KindleUnpack, I need a full version like I've said all along. I've applied the diff files and it stops working. Please post a full version so I can test it with the AZW3 that I have that fails with 0.72f. I was hoping what was posted to make 0.72h would have been a full version. But nope. It just causes KindleUnpack under Windows to break and not work at all.

Last edited by JSWolf; 07-05-2014 at 03:48 PM.
JSWolf is offline   Reply With Quote
Old 07-05-2014, 08:07 PM   #867
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
@JSWolf:You keep saying that the latest KindleUnpack version, doesn't work, but you fail to provide any details such as the exact error message displayed by KindleUnpack. It's quite possible that the latest version, which is not intended for end users anyway, might contain a bug, but if you don't provide any details, it won't be fixed.

Have you tried unpacking the same .azw3 file with the stable KindleUnpack version that is included in the current KindleUnpack Calibre plug-in?

It so, what were the results?
Doitsu is offline   Reply With Quote
Old 07-05-2014, 08:34 PM   #868
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 Doitsu View Post
@JSWolf:You keep saying that the latest KindleUnpack version, doesn't work, but you fail to provide any details such as the exact error message displayed by KindleUnpack. It's quite possible that the latest version, which is not intended for end users anyway, might contain a bug, but if you don't provide any details, it won't be fixed.

Have you tried unpacking the same .azw3 file with the stable KindleUnpack version that is included in the current KindleUnpack Calibre plug-in?

It so, what were the results?
It works with the 0.67 plugin for Calibre. But 0.72f is not the latest. 0.72h is the latest and that's the version I should be testing. I tried building 0.72h and it didn't work. This is why I'd like 0.73h already built so I can test this AZW3. If it then doesn't work, I will post the error and give over the AZW3 if needed so the error can be fixed if there still is an error.
JSWolf is offline   Reply With Quote
Old 07-05-2014, 09:33 PM   #869
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,550
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It's a good plan: keep it a secret until you see if it accidentally/magically gets fixed before giving the devs something concrete they can actually be working on right now.

Here's the skinny: none of the devs are aware of any fatal flaws in 0.72f. If they were, they'd be working on them. So if you HAVE discovered one, the chance that any of the latest PROPOSED changes would accidentally fix that fatal flaw (that no one was aware of in the first place) is slim to none. In short... you're only holding up any potential fix for your issue even longer.
DiapDealer is offline   Reply With Quote
Old 07-05-2014, 10:05 PM   #870
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 DiapDealer View Post
It's a good plan: keep it a secret until you see if it accidentally/magically gets fixed before giving the devs something concrete they can actually be working on right now.

Here's the skinny: none of the devs are aware of any fatal flaws in 0.72f. If they were, they'd be working on them. So if you HAVE discovered one, the chance that any of the latest PROPOSED changes would accidentally fix that fatal flaw (that no one was aware of in the first place) is slim to none. In short... you're only holding up any potential fix for your issue even longer.
What is the deal with posting a full version of 0.72h? It gets posted, I test, if things fail, I post about it and it gets fixed. Simple really. But as it is, I get blocked at all turns about testing the latest version.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

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 PDF 2 06-22-2009 09:28 AM


All times are GMT -4. The time now is 10:43 AM.


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