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-30-2012, 06:45 PM   #1
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: 9,391
Karma: 43141350
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
What's my MOBI? (a python tool)

In response to a few requests I've seen for a way to determine exactly what's under the hood of a "mobi" file, I've written a python script that might help. It allows you to select a MOBI, AZW, AZW3, AZW4, PRC file and determine what type of file—exactly—it is. Is it a:

Regular old MOBI?
Or the old, old TEXtREAd format?
Is it a Topaz book?
A Print Replica?
Or maybe it's the shiny new KF8 format?
Or is it both... a hybrid MOBI/KF8 book?

It should just "work" on Linux or OSX since Python with Tkinter comes standard. Windows will of course have to have Python installed. A default ActiveState Python installation should have everything necessary (TKinter) to run it. I haven't verified everything, but I see no reason that it shouldn't work for Python 2.6 or 2.7 (maybe even 2.5, but someone else will have to test that). It's not overly fancy because I wanted it to work "out of the box" without scads of dependencies to be met.

You can select one file, or multiple files (individually) ... or you can query all mobi-type files (MOBI, AZW, AZW3, AZW4, PRC) in a specified folder. It will even search subfolders recursively for mobi-files if you so choose (*NOTE*: it could take quite a while if you tell it to recursively search a HUGE calibre library folder—depending on your hardware ... you've been warned!).

I'm not much for "pretty" output, so someone else will have to put lipstick on it if they want, but have at it! I'm sure someone will be able break it if they try hard.

P.S. For the ultra-conservatives: it makes absolutely no modifications to the ebook files themselves. The program does, however, attempt to create/modify a tiny file on your hard drive. It uses the file to store the last directory opened so it can begin from there the next time you run the program. It's for convenience only and the program should still work if it can't (for whatever reason) create/modify/read that file. You'll just always have to start from the directory where the script lives when selecting files... each time. Full disclosure and all.
Attached Files
File Type: zip WhatsMyMobi.zip (5.2 KB, 173 views)

Last edited by DiapDealer; 10-01-2012 at 09:45 AM.
DiapDealer is offline   Reply With Quote
Old 10-02-2012, 07:29 PM   #2
st_albert
Fanatic
st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.
 
Posts: 549
Karma: 94420
Join Date: Feb 2010
Device: none
Cool addition to my bag'o'tricks!

Thanks, DD!
st_albert is offline   Reply With Quote
Old 06-07-2013, 06:58 AM   #3
mbmr
Member
mbmr began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Jun 2013
Device: nook
Is it possible to run this from linux command line minus all the GUI stuff something like

$> whatsmymobi.py /path/to/test.mobi
mbmr is offline   Reply With Quote
Old 06-07-2013, 08:56 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: 9,391
Karma: 43141350
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Not without an overhaul of the code, no.
DiapDealer is offline   Reply With Quote
Old 06-14-2013, 06:00 AM   #5
mbmr
Member
mbmr began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Jun 2013
Device: nook
Its ok I have coded things up myself no need to use your code/plugin or calibre anymore for that matter you dont seem too keen on updating things in 2 threads now
mbmr is offline   Reply With Quote
Old 06-14-2013, 07:25 AM   #6
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: 9,391
Karma: 43141350
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm glad you got things working the way you want, but I fear you may be a bit confused as to what "updating" means. I simply didn't recognize the merit of your requests, that's all.
DiapDealer is offline   Reply With Quote
Old 07-01-2013, 01:42 PM   #7
RbnJrg
Evangelist
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 472
Karma: 318996
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Hey, just now I realized about this tool! Very useful indeed, thank you very much for taking the time to write this script.
RbnJrg is offline   Reply With Quote
Old 07-02-2013, 01:17 PM   #8
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: 9,391
Karma: 43141350
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You're welcome. Glad you find it useful.
DiapDealer is offline   Reply With Quote
Old 07-03-2013, 03:21 AM   #9
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 64,785
Karma: 42802463
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
I don't know if this is feasible or not, but would it be possible to display whether or not the book has (Amazon) DRM?
HarryT is offline   Reply With Quote
Old 07-03-2013, 08:36 AM   #10
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: 9,391
Karma: 43141350
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Shouldn't prove too difficult, I wouldn't think. Just need to decide how best to display its presence (or lack thereof).

Last edited by DiapDealer; 07-03-2013 at 08:40 AM.
DiapDealer is offline   Reply With Quote
Old 07-03-2013, 08:53 AM   #11
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 64,785
Karma: 42802463
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
Thanks!
HarryT 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
Python script: batch create mobi's from epubs (if they don't exist) jmeb Conversion 0 05-20-2011 02:14 PM
Do I need to download python before I plugin mobi dedrm anarcHy Plugins 2 09-25-2010 10:33 AM
mobi creation tool for Windows 7? bfollowell Kindle Formats 7 09-18-2010 02:48 AM
python command line tool for kobo reed Kobo Reader 2 06-05-2010 03:07 AM
Is there a tool for mobi like html2lrf? texasnightowl Kindle Formats 3 07-24-2008 12:06 PM


All times are GMT -4. The time now is 08:40 PM.


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