View Single Post
Old 11-28-2007, 04:14 PM   #1
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,043
Karma: 3993884
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
lit2mobi written in Perl working

I am working on a set of programs to convert to Mobipocket format. I have only worked on it a couple of days so the state of the code is alpha. I am a bit unsure if the mobi file is generated entirely correct but it seems to works on my Gen3.

If somebody would like to start using these program you need some familiarity with Perl and you need to know how to install modules from CPAN. I have tested on Linux and it should work on Mac and it might work with some small changes on Windows. Notice that the Perl programs writes the Mobifile so you do not have to run mobigen using wine or other similar programs. You have to have clit installed for lit2mobi to work.

If you do not want to install the program but would like to see the result you can send me a lit file and I will send you back the result so you could help by giving feedback on the result.

The programs are here:

http://www.ida.liu.se/~tompe/mobiperl/mobiperl-0.02.tar

You run it like:
Code:
    lit2mobi The_Railway_Children.lit

    lit2mobi --coverimage cover.jpg file.lit
Documentation available with
Code:
    perldoc html2mobi
since for now lit2html calls html2mobi.

I place the TOC in the beginning of the file also. I also search for a suitable cover image and use it automatically. I do not add a reference to the cover image and that seems to lead to that the book opens on the TOC page and if you go back one page you get the full cover image. If you have a reference you get two cover images instead.

Feedback (bug report, feature suggestions and so on) is very welcome
tompe is offline   Reply With Quote