View Full Version : opening up a lit file


p3aul
04-21-2012, 02:10 PM
I opened up a lit file by changing it's ext to zip and examined the contents. I wanted to extract the covers before converting it to a txt file. I found a file named content with no ext that seems to be the main file. My question is what type of file is it? I tried html but all i got was a blank page in firefox.
Thanks,
Paul

Perkin
04-21-2012, 05:57 PM
As long as it's not DRM'ed there's a utility called convert lit (http://www.convertlit.com/index.php) that can extract the contents.
Or use calibre and do a convert to txtz or htmlz and then examine those files with a zip tool

p3aul
04-21-2012, 10:17 PM
Ok I just wondered what the extension for the file "content" was. I'm on Ubuntu linux and it gives no extension for the file.
Paul

theducks
04-21-2012, 11:09 PM
Ok I just wondered what the extension for the file "content" was. I'm on Ubuntu linux and it gives no extension for the file.
Paul
A LIT file has a LIT extension :D
A viewer for all ebook formats (p/o Calibre) is a viewer for LIT files :D

Perkin
04-22-2012, 07:51 AM
A lit file isn't a zip with a different extension, it had it's own compression. I think (IIRC) zip could read the header, but couldn't extract it properly though. The files were pretty much what are found in an epub, with a few differences - set sizes for covers, etc..

p3aul
04-22-2012, 04:07 PM
I know how to convert a lit file to just about any other format, that's not the issue. I just wanted to experiment and investigate the structure of a lit file. Although it gives me an error, the zip extractor I use in Linux successfully extracted the lit files. I don't know anything about the structure of a lit file but I wanted to learn.

Just changing the .lit to .zip enabled me to extract the contents. Among the contents were:
Folders:
data: 5 cover files Folder
Files:
pb1
pb2
pb3
manifest
meta

There is no extension on any file and on this lit file, no file named "content."
thanks,
Paul

theducks
04-22-2012, 06:16 PM
I know how to convert a lit file to just about any other format, that's not the issue. I just wanted to experiment and investigate the structure of a lit file. Although it gives me an error, the zip extractor I use in Linux successfully extracted the lit files. I don't know anything about the structure of a lit file but I wanted to learn.

Just changing the .lit to .zip enabled me to extract the contents. Among the contents were:
Folders:
data: 5 cover files Folder
Files:
pb1
pb2
pb3
manifest
meta

There is no extension on any file and on this lit file, no file named "content."
thanks,
Paul

Then this question belongs in the formats forum. Moving

DaleDe
04-22-2012, 08:32 PM
It is an OEB file (also known as Open eBook) and shares its source format with eBookwise and Mobipocket. Think of it as ePub version 1.0. You can read about it in our wiki. If you discover any interesting things I would suggest you add to the wiki documentation.

Dale

AnemicOak
04-22-2012, 08:36 PM
The structure of a standard LIT is generally made up of .jpg's of whatever graphics are in the book (cover, chapter headings, etc.), HTML files containing the book text itself, a .css file and an .opf file

p3aul
04-22-2012, 10:27 PM
Anemic Oak:
Undoubtedly, you are correct. However, I tried appending .html to files which by their size, obviously contained the book but no dice.

PeterT
04-22-2012, 10:42 PM
I Although it gives me an error, the zip extractor I use in Linux successfully extracted the lit files.

Have you considered the fact that while the unzip might have been able to create files, the fact you received errors might well indicate that their content is garbage?

When I examine any of the lit files I have via a hex dump, I see they do follow the format described by Microsoft's ITOL/ITLS format (http://www.russotto.net/chm/itolitlsformat.html) which agrees with the MobileRead Wiki entry for lit format (http://wiki.mobileread.com/wiki/LIT).

AnemicOak
04-22-2012, 10:56 PM
Anemic Oak:
Undoubtedly, you are correct. However, I tried appending .html to files which by their size, obviously contained the book but no dice.

Well you're unzipping a file that's meant to be taken apart a different way from my experience, so you could be getting all kinds of junk.

Perkin
04-23-2012, 10:36 AM
Referring to my earlier post:
A lit file isn't a zip with a different extension, it had it's own compression. I think (IIRC) zip could read the header, but couldn't extract it properly though.

That's why you can't re-create the files by unzipping them.

HarryT
05-20-2012, 05:01 PM
Referring to my earlier post:


That's why you can't re-create the files by unzipping them.

The "convert LIT" tool can be used to "explode" a LIT file to its HTML source.