Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 02-03-2021, 10:19 AM   #466
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
Improving EXTH 403 decode

Just for information (at the occasion of playing with locking fonts of a book in this thread).

I noticed in the KindleUnpack of the sample AZW3, in the OPF <!-- BEGIN INFORMATION ONLY section, the entry <meta name="Unknown_(403)_(hex)" content="01" />

After removing this header, I found that the book opens with the ereader fonts instead of publisher fonts. I don't know which <meta name=?> triggers Kindlegen to generate the 403 header, but I thought KindleUnpack could possibly improve its decode from "Unknown_" to something like "Open With Publisher Fonts".

To illustrate:
Spoiler:

Before: Click image for larger version

Name:	The Thursday Murder Club - Richard Osman.azw3 Gluggy Capture d'écran 2021-02-01 21.01.29.png
Views:	212
Size:	90.0 KB
ID:	185203Click image for larger version

Name:	The Thursday Murder Club - Richard Osman.azw3 screenshot_2021_01_31T08_09_33-0500.png
Views:	205
Size:	54.3 KB
ID:	185204
After: Click image for larger version

Name:	The Thursday Murder Club - Richard Osman_new.azw3 Gluggy Capture d'écran 2021-02-01 21.02.30.png
Views:	204
Size:	85.2 KB
ID:	185205Click image for larger version

Name:	The Thursday Murder Club - Richard Osman_new.azw3 screenshot_2021_01_31T08_08_53-0500.png
Views:	204
Size:	59.6 KB
ID:	185206
PoP is offline   Reply With Quote
Old 02-04-2021, 09:20 PM   #467
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by PoP View Post
Just for information (at the occasion of playing with locking fonts of a book in this thread).

I noticed in the KindleUnpack of the sample AZW3, in the OPF <!-- BEGIN INFORMATION ONLY section, the entry <meta name="Unknown_(403)_(hex)" content="01" />

After removing this header, I found that the book opens with the ereader fonts instead of publisher fonts. I don't know which <meta name=?> triggers Kindlegen to generate the 403 header, but I thought KindleUnpack could possibly improve its decode from "Unknown_" to something like "Open With Publisher Fonts".
I did some testing of the free sample of that book patched as you describe on my Kindle Oasis and have not been able to duplicate the results you describe. I am however seeing something very odd that works the same in both the patched and unpatched book.

I sideload the book and then immediately opened it and as you indicated the publisher fonts were not displayed. I then selected another font in the Aa menu and switched back to publisher font. After that the publisher font was displayed correctly.

In another test I sideload the book but then opened another book, closed it, and opened the sideloaded book. In that case the publisher fonts were displayed correctly from the start.

Finally I opened the sideloaded book and didn't see publisher fonts. Then closed it, opened another book, and went back to the sideloaded book. The publisher fonts were then shown.

So as far as I can tell there is a bug, but it does not seem to depend on the EXTH 403 field.
jhowell is offline   Reply With Quote
Advert
Old 02-07-2021, 10:29 AM   #468
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
OK PoP just made another bad guess Perhaps <meta name="Mysterious_(403)_(hex)" content="01" /> is more appropriate then.
PoP is offline   Reply With Quote
Old 02-07-2021, 04:07 PM   #469
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by PoP View Post
OK PoP just made another bad guess Perhaps <meta name="Mysterious_(403)_(hex)" content="01" /> is more appropriate then.
You made a reasonable guess.

I have be wondering about the purpose of EXTH 403 for a while. As far as I can tell it cannot be produced by kindlegen.

The other EXTH types numerically close to it control restrictions related to DRM, so it may be related to that. I surveyed the books I have purchased from Amazon a while ago and about 10% have it set to one, more have it set to zero. I haven't found any consistent difference in capabilities associated with it.
jhowell is offline   Reply With Quote
Old 10-25-2021, 12:10 PM   #470
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 62
Karma: 12802
Join Date: Apr 2014
Device: none
I used the plug-in to make the necessary edits to the MOBI file and now would like to repack it. What would be the easiest way to do so? Is there a KindleRepack plug-in or something like that? If not, would it be possible to make one?
mikapanja is offline   Reply With Quote
Advert
Old 10-26-2021, 08:15 AM   #471
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by mikapanja View Post
I used the plug-in to make the necessary edits to the MOBI file and now would like to repack it. What would be the easiest way to do so? Is there a KindleRepack plug-in or something like that? If not, would it be possible to make one?
Kindleunpack does not just unpack the MOBI. It attempts to (as much as possible) undo the transformation performed by kindlegen when creating MOBI and KF8 format.

Repacking would mean passing the result back into kindlegen. (Kindlegen is now part of Amazon's Kindle Previewer.)
jhowell is offline   Reply With Quote
Old 01-03-2022, 04:56 PM   #472
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
[GUI Plugin] KindleUnpack - The Plugin

Hello Diap,

I am not sure if such has been mentioned before.

I think some of us purchase Kindle yet don’t have a Kindle device because sometimes Amazon is the only source for an ebook. As such, I think some of us always unpack azw4 and azw3 to EPUB. I am not familiar with the plug-in API yet it seems possible. Might you or someone someday be able to add an option to auto unpack such and add as a format? That would be so great and save effort for something that some of us always do.
democrite is offline   Reply With Quote
Old 01-03-2022, 11:16 PM   #473
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,428
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by democrite View Post
Hello Diap,

I am not sure if such has been mentioned before.

I think some of us purchase Kindle yet don’t have a Kindle device because sometimes Amazon is the only source for an ebook. As such, I think some of us always unpack azw4 and azw3 to EPUB. I am not familiar with the plug-in API yet it seems possible. Might you or someone someday be able to add an option to auto unpack such and add as a format? That would be so great and save effort for something that some of us always do.
I don't feel that having the plugin insert itself into the book import chain is a worthwhile use of the programmer's time. You could use the ActionChains plugin if you wish to automate the process. You can see some possibilities in the Action Chains Scripts forum.
DNSB is offline   Reply With Quote
Old 01-04-2022, 11:15 PM   #474
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I've got to work on making sure the plugin will work with the upcoming change to PyQt6 before considering anything new.
DiapDealer is offline   Reply With Quote
Old 01-06-2022, 11:34 AM   #475
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Updated to v0.83.1 to support the upcoming Calibre 6 and (Py)Qt6. Tested to work with the latest Calibre 6 betas and back as far as Calibre 0.8.60.

No new features or bugfixes--just a boring maintenance release to support the upcoming Calibre6.

Last edited by DiapDealer; 01-06-2022 at 11:38 AM.
DiapDealer is offline   Reply With Quote
Old 01-12-2022, 05:00 AM   #476
stefano.sb
Zealot
stefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheese
 
Posts: 103
Karma: 1000
Join Date: May 2013
Device: Kindle Paperwhite
Quote:
Originally Posted by DiapDealer View Post
.....

There is no "easy and quick" way to determine a file's KF8-ness. Your way works as well as another. There are some scripts you could run to dump the mobi headers... you could also open the ebook in the Kindle App (PC/Mac). For the time being, KF8 books can only be read in single column view with the apps; so multi-column mode just won't change anything—telling you it's a KF8. But I don't know how long that might be relied on.
Hi DiapDealer and first of all thanks for your plug-in :-)

I have quoted this old post because I'd like to determinate if a MOBI file is a mobi7, mobi8 or it's a mobi7+mobi8 version without unpacking it. If I understand well when I convert an ebook using Calibre I can use MOBI Output option with OLD=Mobi7, NEW=mobi8 and BOTH=mobi7+mobi8

It would be nice to have an option in KindleUnpack plug-in that for every MOBI file selected sets a Calibre custom column with 0->MOBI type doesen't recognized, 1->MOBI7, 2->MOBI8, 3->BOTH

Is there in yuor source code a specific function that I can use to try to understand how to do that?

Thanks

Stefano
stefano.sb is offline   Reply With Quote
Old 01-12-2022, 10:08 AM   #477
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I've no clue, unfortunately, where the best place to set a calibre custom column in this plugin would be. This plugin's codebase is something that I have to re-familiarize myself with whenever a Calibre update makes it necessary to revisit it. Plus... other than inserting an extracted epub/pdf back into the calibre library, I don't have a lot of interest in adding much in the way of calibre-specific features to this plugin. I'm not all that familiar with calibre's codebase--and utterly clueless when it comes to setting custom columns programmatically. Happy to consider incorporating a patch or pull-request if you (or someone else) get something non-invasive working, though.

As for what type of mobi it is before unpacking: the options available in the KindleUnpack menu should tell you that (with individual books). If there is no ability to split, or extract an Epub (or pdf), it's a plain-jane Mobi-7. If the option to extract an epub is present, it's a KF8. If the option to split is present, it's a combination Mobi7/KF8. If the option to extract a pdf is present, it's an azw4.

But I'm afraid modifying this plugin to merely mark books for later unpacking isn't very likely. Perhaps a new "What's My Mobi" type of plugin would be more suitable for that. This one is very much geared toward extracting or unpacking from the get-go, rather than just flagging

Last edited by DiapDealer; 01-12-2022 at 04:46 PM.
DiapDealer is offline   Reply With Quote
Old 01-12-2022, 11:31 AM   #478
stefano.sb
Zealot
stefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheese
 
Posts: 103
Karma: 1000
Join Date: May 2013
Device: Kindle Paperwhite
Quote:
Originally Posted by DiapDealer View Post
.... Perhaps a new "What's My Mobi" type of plugin would be more suitable for that. This one is very much geared toward extracting or unpacking from the get-go, rather than just flagging
Thanks for the clear answer. I'm actually considering the idea of ​​creating a small ad-hoc plug-in that we can easily call "What's My Mobi" :-)

Looking in the code I found the "build_single_book_menus (self, book_id)" function in the action.py file which, according to the MOBI type of the selected book, it changes the menu on the fly. Starting from here I think I can realize the function I need ...

Stefano
stefano.sb is offline   Reply With Quote
Old 01-12-2022, 04:52 PM   #479
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I think I actually have a "What's my Mobi?" type python script somewhere that generates a report/log about kindlebook files in directories. You're welcome to it if I can find it (and you can use it).
DiapDealer is offline   Reply With Quote
Old 01-13-2022, 05:40 AM   #480
stefano.sb
Zealot
stefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheesestefano.sb can extract oil from cheese
 
Posts: 103
Karma: 1000
Join Date: May 2013
Device: Kindle Paperwhite
Quote:
Originally Posted by DiapDealer View Post
I think I actually have a "What's my Mobi?" type python script somewhere that generates a report/log about kindlebook files in directories. You're welcome to it if I can find it (and you can use it).
stefano.sb is offline   Reply With Quote
Reply

Tags
mobi2mobi


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] EpubSplit JimmXinu Plugins 422 04-07-2024 04:10 PM
[GUI Plugin] EpubMerge JimmXinu Plugins 522 04-01-2024 10:25 AM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
[GUI Plugin] Ex Libris AlPe Plugins 87 10-10-2020 03:10 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 03:38 AM.


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