Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 07-19-2019, 07:39 PM   #1261
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,506
Karma: 5433350
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.
KevinH is offline   Reply With Quote
Old 07-19-2019, 07:47 PM   #1262
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,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
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.
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.
DiapDealer is offline   Reply With Quote
Advert
Old 07-19-2019, 08:51 PM   #1263
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,470
Karma: 84000001
Join Date: Nov 2011
Location: Tampa Bay, Florida
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()
jhowell is online now   Reply With Quote
Old 07-19-2019, 09:07 PM   #1264
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,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Thanks! I will make time to play with it over the weekend.

Kevin


Quote:
Originally Posted by jhowell View Post
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()
KevinH is offline   Reply With Quote
Old 07-20-2019, 03:09 AM   #1265
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,406
Karma: 305065800
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.
pdurrant is offline   Reply With Quote
Advert
Old 08-03-2019, 03:06 PM   #1266
AcidWeb
KCC Co-Author
AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.
 
AcidWeb's Avatar
 
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 03:10 PM.
AcidWeb is offline   Reply With Quote
Old 08-03-2019, 04:51 PM   #1267
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,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Don't extract them. Simply remove the old mobi parts leaving the remaining records and adjust the header.
KevinH is offline   Reply With Quote
Old 08-03-2019, 06:01 PM   #1268
AcidWeb
KCC Co-Author
AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.AcidWeb ought to be getting tired of karma fortunes by now.
 
AcidWeb's Avatar
 
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.
AcidWeb is offline   Reply With Quote
Old 08-03-2019, 07:25 PM   #1269
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,506
Karma: 5433350
Join Date: Nov 2009
Device: many
It is all documented in the KindleUnpack code and in the DumpMobiHeader code.
KevinH is offline   Reply With Quote
Old 08-09-2019, 10:12 PM   #1270
tkeo
Connoisseur
tkeo began at the beginning.
 
Posts: 94
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
Quote:
Originally Posted by AcidWeb View Post
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.
Is it not enough to comment out or delete lines from 317 to381 in mobi_split.py?
tkeo is offline   Reply With Quote
Old 11-07-2020, 12:30 PM   #1271
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 833
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.
droopy is offline   Reply With Quote
Old 11-07-2020, 03:14 PM   #1272
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,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by droopy View Post
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.
This is the thread for the stand-alone KindleUnpack python script. The Calibre plugin version's support thread can be found at:

https://www.mobileread.com/forums/sh...d.php?t=171529
DiapDealer is offline   Reply With Quote
Old 12-30-2020, 01:10 AM   #1273
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,583
Karma: 4300000
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!
odamizu is offline   Reply With Quote
Old 12-30-2020, 04:21 AM   #1274
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,406
Karma: 305065800
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by odamizu View Post
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!
It sounds like you did the right things. The .pyc are cached compiled versions of the .py files and will be overwritten by new versions when the updated .py files are run.
pdurrant is offline   Reply With Quote
Old 12-30-2020, 01:00 PM   #1275
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,583
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
Quote:
Originally Posted by pdurrant View Post
It sounds like you did the right things. The .pyc are cached compiled versions of the .py files and will be overwritten by new versions when the updated .py files are run.
Thank you! This is exciting

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
odamizu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:40 AM.


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