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 11-05-2013, 11:33 AM   #1
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
Help with modifying MOBI file

Ladies and Gentlemen,

I left my warm lair at Kindle subforum and come here to ask for help.
I need to achieve some specific MOBI modifications and my level of Python-Fu prevents me to write it myself.

I have 500mb MOBI files created by KindleGen (Hybrid M7/KF8 headers) and I need:
  1. Remove Source header. To decrease file size ~50%.
  2. Change header field 501 to EBOK. To remove that ugly Personal tag on Kindle Paperwhite.
Currently I achieve both goals with modified KindleUnpack. It works correctly - KindleUnpack is awesome but it is way to slow with so big files. KindleStrip remove Source header much faster... but then I need to modify headers and I can't. All metadata editors I found fail due the fact they edit only first (M7) headers. KF8 headers are untouched.

I would be very gratefully for some Python snippets to edit that field 501 in both headers. Something slimer than parsing entire file like KindleUnpack. I need a scalpel and KindleUnpack is hammer :-) Patch to KindleStrip that set field 501 in both headers would be perfect.

Free candy to anybody who can help me.

Last edited by AcidWeb; 11-05-2013 at 01:19 PM.
AcidWeb is offline   Reply With Quote
Old 11-05-2013, 01:34 PM   #2
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
There's no such thing as a "snippet" when it comes to editing metadata in a binary MOBI file. It's extremely involved, no matter what programming/scripting language you use. That's why people just tend to use whatever is already "out there."

Mobi2Mobi-Gui or the command-line mobiperl tools will allow you to edit the 501 record. Both have "stickied" threads in this forum.
DiapDealer is offline   Reply With Quote
Old 11-05-2013, 01:37 PM   #3
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
Obviously I'm not talking about one line of code :-)

Considering that KindleUnpack and KindleStrip is already here maybe somebody with right skillset know how to do it.

Last time I checked Mobi2Mobi-GUI was not editing KF8 part of header in hybrid MOBIs.
AcidWeb is offline   Reply With Quote
Old 11-05-2013, 02:00 PM   #4
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
Quote:
Originally Posted by AcidWeb View Post
Last time I checked Mobi2Mobi-GUI was not editing KF8 part of header in hybrid MOBIs.
You're right. Nothing is currently editing the KF8 header portion of a hybrid MOBI. The problem is that there's just so much work for so little gained ... especially something as specialized as you're wanting. For someone to create a python script that allows you to edit one specific record of the KF8 header portion of a hybrid MOBI (produced by kindlegen) is nearly as daunting as it would be to create a python script that allows you to edit EVERY record of the KF8 header portion of a hybrid MOBI.

Not impossible, by any means, it just seems that no one with the right skill-set has needed such a thing for themselves badly enough (yet) for it to happen.

But pay no mind to the crabby old fart. Someone may yet take up your cause!
DiapDealer is offline   Reply With Quote
Old 11-05-2013, 02:13 PM   #5
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'm fully aware that I'm not asking about Hello world in Python :-)

I'm not Python guru but considering that KindleUnpack already can extract KF8 part from hybrid MOBI and can edit KF8 part of header after exaction I believe that editing that header in place is attainable.

I made this post to consult people who messed with that headers already. Because I'm just kid stray in the mist trying to increase my KCC conversion speed. And speed difference between KindleUnpack and KindleStrip don't let me sleep at night :-D

Last edited by AcidWeb; 11-05-2013 at 03:57 PM.
AcidWeb is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
18MB EPUB converts to 40MB Mobi! What can I do to reduce Mobi file size? perdman Conversion 11 12-09-2017 04:18 AM
Update Mobi header/file metadata without doing a Mobi to Mobi conversion RecQuery Conversion 2 06-30-2012 11:43 AM
Modifying NCX file InDesign CS5 mobi eggheadbooks1 Kindle Formats 0 10-03-2011 03:52 PM
Modifying metadata in .mobi files LeapinLar Library Management 4 09-10-2011 06:05 PM
Modifying Extensions.cfg File Mickey330 PocketBook 11 06-23-2010 02:19 PM


All times are GMT -4. The time now is 12:19 PM.


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