Extracting .lit files

I have a bunch of ebooks in Microsoft’s .lit format, but I want to read them on my Linux box.  I tried installing Microsoft Reader through wine, but that doesn’t work for me.  It will pop up and crash down again just as fast.

I used to use the Openberg Firefox addon, but it has not been updated to Firefox 3 so that is not an option any more.

So now I just need to extract the files and then I can read the damn books as html.

There’s a program for doing this called clit (really it is, I am not making it up).  You can get it here.

To make it sligthly easier for me to extract the files I wrote a small script:

#!/bin/bash

for litfile in "$@"; do
    dir=`dirname "$litfile"`
    outdir=$dir/`basename "$litfile" .lit`/
    clit "$litfile" "$outdir"
done

and added it to my nautilus-actions.

Excellent, now I can just right-click on the files I want to extract, and viola I have the html hidden under the .lit file.

Tags:

6 Responses to “Extracting .lit files”

  1. Jonathan Badger Says:

    Realize that if you want to read them on a desktop, you may want to use FBReader (an open source e-book reader). While it doesn’t read lit files directly, using clit to expand the file and then compressing all the generated files for a given book into a zip file for neatness makes a nice one-file repository that can be read by FBReader

    One of the major advantages of using an ebook reader rather than a web browser is that your place in the book is remembered.

    http://www.fbreader.org/

  2. Thomas Mailund Says:

    Thanks Jonathan. I have been looking for a reader to replace Openberg :)

  3. Yoric Says:

    One quick word: I’ll try and find the time to upgrade OpenBerg to Firefox 3 in 2009. Well, it’ll probably be Firefox 3.1 by then.

  4. Thomas Mailund Says:

    Sounds great, thanks

  5. Eugene Says:

    Nice article. Thanks. :) Eugene

  6. V Says:

    you could use the reader from calibre (http://calibre.kovidgoyal.net/)

Leave a Reply