View Single Post
Old 02-15-2012, 12:37 PM   #1
Limey
Junior Member
Limey plays well with othersLimey plays well with othersLimey plays well with othersLimey plays well with othersLimey plays well with othersLimey plays well with othersLimey plays well with othersLimey plays well with othersLimey plays well with othersLimey plays well with othersLimey plays well with others
 
Posts: 9
Karma: 2831
Join Date: Dec 2011
Device: Kindle
Programmatically reading mobi EXTH header

Hi all,

I have been writing a program in C# (.Net 4.0) to help my dad reorganise his ebook collection (almost entirely MOBI format) by renaming all the files into a tidier format based on the authorname of the folder they're in.

If possible I'd like to extend this to programmatically get the author name and title etc from the metadata within the MOBI file itself. I'd like to try to do this from the standard MOBI metadata since not all of these ebooks will necessarily have been generated by or processed using Calibre.


From what I've read so far reading EXTH header information can be tricky because it can be compressed, some of it using Mobi's own secret compression scheme.

Am really just starting out on this, so was wondering if anyone had any information on programmatically reading EXTH header information and whether it's necessary to first get a routine to decompress the file? Looking at the wikipedia entry for mobi file format and EXTH header, I think I can probably easily read in the information I want once I can get at its XML format rather than the compressed version that seems to be in the MOBI files I have.

I don't want to write or update anything within the file, just read the metadata.

Thanks in advance if anyone can point me in the right direction!
Limey is offline   Reply With Quote