View Full Version : Convert LIT bug & patch


llasram
12-28-2007, 04:18 PM
I'm surprised no one else has noticed this, but Convert LIT 1.8 has a bug which causes it to occassionally generate incorrect cross-file links. For example, it may link to footnote14.html instead of footnote1.html or page71.jpg instead of page7.jpg. I've e-mailed the maintainer, but given that the Convert LIT page hasn't been updated for a few years I'm not sure what sort of response to expect. For the time being, the attached patch fixes this issue for me.

kovidgoyal
12-28-2007, 09:12 PM
If you dont receive a response from the clit maintainers and since this concerns the conversion of undrmed lit files to HTML are you interested in re-implementing that part of clit in python? I've already made a beginning at the port (to read metadata from lit files) it's in the metadata module of libprs500's source tree.

tompe
12-28-2007, 09:42 PM
If you could tell the Debian maintainer for clit about this it would be good...

llasram
12-30-2007, 03:29 PM
If you dont receive a response from the clit maintainers and since this concerns the conversion of undrmed lit files to HTML are you interested in re-implementing that part of clit in python? I've already made a beginning at the port (to read metadata from lit files) it's in the metadata module of libprs500's source tree.

Ok, I'm game. :-)

kovidgoyal
12-30-2007, 05:05 PM
Here's a link to the lit decompiling code I have so far, it extracts the metadata OPF file from the lit file.

https://libprs500.kovidgoyal.net/browser/trunk/src/libprs500/ebooks/metadata/lit.py

You can use it as a base to extract the other file types. Ask if you need any help.