Extracting .lit files
Sunday, October 19th, 2008I 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.