Amazon banner

Thursday, May 7, 2009

Ubuntu tutorial of the day lit files!

lit file are a pain in the ass even in windows! In windows I use to convert them to pdf using the ABC Amber text converter. This is pretty much how to install and use clit a lit converter for Linux.

Download both .deb files from the address bellow to your desktop.
http://ubuntuforums.org/showthread.php?t=159331&page=2

.deb file are the same thing as a windows installer so you just click on them to start the installation and Ubuntu will take care of the rest.
In this case you should install them in this order

1.
libtommath0_0.39-3_i386.deb

2. clit_1.8-1_i386.deb

Now that you have clit and it library installed let use it to extract data from a lit file
first create a new folder on your desktop call it Book or whatever else you want to call it than copy and paste the lit file you want to convert on your desktop if you did not already.

Now chance are your lit file might have a space in it filename you need to remove it. Command line program don't like file name with space in file name. So the file "this book suck.lit" need to be renamed to "this_book_suck.lit" or "this-book-suck.lit"

open a terminal than type.
clit
add a space after clit than drag and drop your lit file to the terminal you should get something like this.
$ clit '/home/username/Desktop/this_book_suck.lit'
add a space than drag and drop the book folder i told you to create in the terminal.
That should give you something like this.
$ clit '/home/username/Desktop/this_book_suck.lit' '/home/username/Desktop/book'
Press enter and watch in amazement as everything in that lit file is being extracted to the book folder.

You will get a few files one of them is an html file that contain the text you could just open it with Firefox than print to file to get a pdf out of that html file or you could copy and paste the text to OpenOffice to create a pdf with the picture of the book cover on page one.

2 comments:

  1. It seems that the libtommath_0.37-1_i386 archive is not available any more from the australian page. Do you know of any other source? Thanks.

    ReplyDelete
  2. Sorry about that it an old blog post am going to update it in a few minutes!

    ReplyDelete