07-19-2019, 08:39 PM | #1261 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Good point. I have spent no time grokking the kfx codebase but I would like a standalone python version that does not require all of calibre that will take a no dm kfx and convert it to something as epublike as possible. If that already exists, great. If not, I would like to use whatever code we have to "unpack" a kfx into an epub or fixed layout epub if that is what it takes.
|
07-19-2019, 08:47 PM | #1262 |
Grand Sorcerer
Posts: 28,042
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Oh absolutely. Same here. I'm just completely ignorant as to whether any of the existing routines in KindleUnpack will be helpful or not in that regard. If it turns out they will; great.
|
Advert | |
|
07-19-2019, 09:51 PM | #1263 |
Grand Sorcerer
Posts: 6,753
Karma: 86500093
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
I intended kfxlib to work outside of calibre, but it hasn't been fully tested that way. The basic method of converting KFX to EPUB would be something like:
Code:
import logging from kfxlib import YJ_Book book = YJ_Book(kfx_file, logging) epub_data = book.convert_to_epub() |
07-19-2019, 10:07 PM | #1264 | |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Thanks! I will make time to play with it over the weekend.
Kevin Quote:
|
|
07-20-2019, 04:09 AM | #1265 |
The Grand Mouse 高貴的老鼠
Posts: 72,541
Karma: 309500000
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
I'm afraid I haven't had time to do much development of any kind, so I'm happy just to observe at this point.
|
Advert | |
|
08-03-2019, 04:06 PM | #1266 |
KCC Co-Author
Posts: 845
Karma: 765434
Join Date: Mar 2013
Location: Poland
Device: Kindle Oasis 2
|
I still need Python 3 code that can efficiently extract AZW3 part of image heavy dual MOBI files.
Current implementation in mobi_split.py need minutes for ~500mb file. Consider this post as code bounty. I can pay over PayPal. Contact me for details. Any result of this bounty will be released with GPLv3 license. Last edited by AcidWeb; 08-03-2019 at 04:10 PM. |
08-03-2019, 05:51 PM | #1267 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Don't extract them. Simply remove the old mobi parts leaving the remaining records and adjust the header.
|
08-03-2019, 07:01 PM | #1268 |
KCC Co-Author
Posts: 845
Karma: 765434
Join Date: Mar 2013
Location: Poland
Device: Kindle Oasis 2
|
I don't have sufficient knowledge about MOBI structure to do it.
|
08-03-2019, 08:25 PM | #1269 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
It is all documented in the KindleUnpack code and in the DumpMobiHeader code.
|
08-09-2019, 11:12 PM | #1270 | |
Connoisseur
Posts: 94
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
|
Quote:
|
|
11-07-2020, 01:30 PM | #1271 |
Guru
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
I've just installed KindleUnpack into my Calibre. Even though I have an AZW4 title selected, "Unpack AZW4" is greyed out and not responsive to a mouse click.
update: I also have DeDRM installed. |
11-07-2020, 04:14 PM | #1272 | |
Grand Sorcerer
Posts: 28,042
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
https://www.mobileread.com/forums/sh...d.php?t=171529 |
|
12-30-2020, 02:10 AM | #1273 |
just an egg
Posts: 1,697
Karma: 5514284
Join Date: Mar 2015
Device: Kindle, iOS
|
Thank you DiapDealer and KevinH for updating KindleUnpack to 0.83 along with Sigil and Calibre plugins.
I like pdurrant's lovely drag & drop AppleScript very much, so I'm attempting to expand my experience with AppleScript applets and see if I can update it myself. I downloaded KindleUnpack python scripts from KevinH's GitHub. I then opened the existing 0.81 AppleScript with "Show Package Contents" and copied all the files from KindleUnpack "lib" folder into the AppleScript's "Resources" folder, overwriting any pre-existing file with the same name. I then opened the AppleScript with Script Editor, navigated to Bundle Info and updated the Name and Short Version to 0.83. Then I compiled (hammer icon), ran the script (play icon), and saved everything. Also, each file seems to exist as a .py and .pyc. The files I copied over from KindleUnpack GitHub folder were all .py, so the .pyc files were not overwritten, though after I saved the AppleScript the date modified on all the .pyc files changed to today's date. I have no idea what this means. When I dragged an azw3 onto the finished AppleScript, it appeared to run properly and produced a folder with the unpacked Kindlebook. However, I don't really know what I'm doing here, so any feedback on whether I'm missing anything would be greatly appreciated. Thank you! |
12-30-2020, 05:21 AM | #1274 | |
The Grand Mouse 高貴的老鼠
Posts: 72,541
Karma: 309500000
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
|
|
12-30-2020, 02:00 PM | #1275 | |
just an egg
Posts: 1,697
Karma: 5514284
Join Date: Mar 2015
Device: Kindle, iOS
|
Quote:
Was it necessary for me to compile and run the AppleScript after copying over the files? Or would copying the new files into the AppleScript have been sufficient? And thank you, pdurrant, as always, for your wonderful AppleScripts. I love them so. I have tried to learn to write AppleScripts, but I don't get far before hitting a wall in my inadequate brain |
|
|
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 05:16 PM |
PDF to Mobi with text and images | pocketsprocket | Kindle Formats | 7 | 05-21-2012 08:06 AM |
Mobi files - images | DWC | Introduce Yourself | 5 | 07-06-2011 02:43 AM |
pdf to mobi... creating images rather than text | Dumhed | Calibre | 5 | 11-06-2010 01:08 PM |
Transfer of images on text files | anirudh215 | 2 | 06-22-2009 10:28 AM |