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 09-17-2011, 07:38 PM   #1
m0ngr31
Connoisseur
m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.
 
Posts: 66
Karma: 3056
Join Date: Dec 2010
Device: Kindle Paperwhite
Figure out number of Kindle book locations from mobi file size?

Pretty much what the title is asking. I'm trying to figure out a way to find the total number of locations kindle would use from a mobi file. Its going to be in a batch script to extract other information as well. I'm using mobi2mobi right now to get the other information so I was wondering if there is any info from mobi2mobi that I could use to calculate the number of locations that Kindle would see in a mobi file.

I'm hoping that all made sense and someone can give me some info for this project I'm working on...
m0ngr31 is offline   Reply With Quote
Old 09-17-2011, 09:57 PM   #2
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 1,814
Karma: 1662214
Join Date: Jan 2009
Device: Kindle, iPad (not used much for reading)
Locations are supposed to be 128 bytes each.
susan_cassidy is offline   Reply With Quote
Old 09-17-2011, 10:09 PM   #3
m0ngr31
Connoisseur
m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.
 
Posts: 66
Karma: 3056
Join Date: Dec 2010
Device: Kindle Paperwhite
Where do I get the byte size of the text from? I've tried a bunch of different numbers, but none of them are correct.
m0ngr31 is offline   Reply With Quote
Old 09-18-2011, 10:47 AM   #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: 8,771
Karma: 39540023
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It's 128 bytes of source text (the underlying markup language), by the way. Not just the words being rendered on the screen. 1 character = 1 byte (including spaces) is a fairly safe rule of thumb (yes, I'm aware it's not exactly as simple as that for all those perfectionists out there).

I'm afraid there's not going to be any easy or (very accurate for that matter) conversion from file size->source characters->bytes->locations. There's different levels of compression and many mobi's html source isn't as—shall we say—tidy... or KISS as others.

The only way to get the data you really need is to unpack the mobi and gain access to it's raw markup language. Anything else will be basically a wild-ass guess.
DiapDealer is offline   Reply With Quote
Old 09-18-2011, 11:48 AM   #5
Mike L
Wizard
Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.Mike L ought to be getting tired of karma fortunes by now.
 
Mike L's Avatar
 
Posts: 1,385
Karma: 3793261
Join Date: Apr 2009
Location: Edinburgh, Scotland
Device: Kindle 3, Nexus 7
It would also be interesting if you could find a way to determine the appproximate number of words of a given book. I don't mean doing a brute force word count, but some rule of thumb that would let you convert the file size to a word count.

I'd find that useful in getting a rough idea how long a book is (I can think in words better than in locations or characters).
Mike L is offline   Reply With Quote
Old 09-18-2011, 01:37 PM   #6
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 1,814
Karma: 1662214
Join Date: Jan 2009
Device: Kindle, iPad (not used much for reading)
Doh. Forgot that location size was from source. I find that file size is a relatively good indicator of the size of the book. You just have to get used to it, is all. Of course, I read mostly novels, where graphics aren't involved very often, which can bulk up the file size.
susan_cassidy is offline   Reply With Quote
Old 09-18-2011, 01:55 PM   #7
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: 8,771
Karma: 39540023
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Doh. Forgot that location size was from source. I find that file size is a relatively good indicator of the size of the book. You just have to get used to it, is all. Of course, I read mostly novels, where graphics aren't involved very often, which can bulk up the file size.
Certainly, it might be possible to come up with some averages that will suffice for the most part. But even in the case of novels, keep in mind that a "screen" full of one-line dialogue is probably going to contain more source than a "screen" filled with one long paragraph—even though the latter may contain more rendered words. In short: a smaller book full of dialogue may contain more locations than a larger book that's comprised primarily of descriptive prose.
DiapDealer is offline   Reply With Quote
Old 10-27-2011, 10:31 PM   #8
scl
Junior Member
scl began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2011
Location: Florida
Device: Kindle 3
I just did an experiment. I'm working on a mobi file trying to get my kindle 3
to show page numbers, so I've got the files handy. I have 11.9 KB of html in it, along
with some jpg images. When I rename the mobi as a zip file and unpack it I see the
same 11.9 KB of html. 11.9 KB divided by 128 is 95.2. When I look at the book on
my kindle it says there are 83 locations. 11.9 KB divided by 83 gives about 147 bytes per location. For another mobi file I made, the html is just over 464 KB, both in the source and in the unzipped mobi. The kindle says this one has 3135 locations. 464 KB divided by 128 is 3716. 464 KB divided by 3135 locations gives about 152 bytes per location. The larger file is almost all text.

My conclusion is that the size of the html in the mobi, divided by 150 should give a
fair approximation of the number of locations on the kindle.
scl 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
18MB EPUB converts to 40MB Mobi! What can I do to reduce Mobi file size? perdman Conversion 7 08-27-2011 02:40 PM
ePub to Mobi - file size leap lenz117 Kindle Developer's Corner 0 07-08-2011 01:39 PM
Question about File Locations KrowNB Library Management 30 02-21-2011 10:15 PM
number of pages/locations/words? egg Calibre 3 11-25-2010 04:47 AM
Book (file) size irenas Astak EZReader 15 04-15-2010 03:21 PM


All times are GMT -4. The time now is 01:25 AM.


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