View Full Version : Calibre now includes MS LIT converter: lit2lrf


Pages : 1 [2]

greylin
01-29-2008, 03:43 AM
Thanks! :)

Basqueman
02-09-2008, 04:41 AM
Hello,
I've installed the ConvertLIT as well as the libprs500 GUI and have been attempting to convert an LIT file. I downloaded a free sample LIT file from Fictionwise.com in order to learn how to do this. When I tried to add the LIT file to the library I received the following message:

OPFReader' object has no attribute 'cover_data'
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 289, in add_books
File "main.py", line 301, in _add_books
File "libprs500\ebooks\metadata\meta.pyo", line 35, in get_metadata
File "libprs500\ebooks\metadata\__init__.pyo", line 77, in __init__
AttributeError: 'OPFReader' object has no attribute 'cover_data'

After this I ran the LIT file thru the ConvertLIT software. The software extracted all the files and placed them into the folder. Most of the files extracted were HTML and JPEG with one OPF file. I then opened libprs500 GUI again and tried to add the OPF file to the library, but I couldn't because it wasn't one of the file extensions on the file type. I then added an HTML file to the library that contained the sample and clicked the convert button and the dialog box, HTML to LRF file came up. I sat and watched the hour glass spin for a long time. Nothing happened. I walked away and let it run for about 15 minutes....nothing happened.

Am I doing something wrong?

Thank you.

kovidgoyal
02-09-2008, 11:25 AM
Looks like a bug can you post a link to this book so I can debug.

Basqueman
02-09-2008, 11:57 AM
Here you go. I've attached the OPF file. I can't attach the LIT file. Let me know if this is the right file. The HTML to LRF finally worked after about 40 minutes, but a book wasn't really created. Only one file was converted. I probably did something wrong.

kovidgoyal
02-09-2008, 12:12 PM
No that's fine, it's a bug that will be fixed in the next release.

waden34
02-15-2008, 02:36 PM
I wish the high payed guys at Sony put as much thought/effort into their tools as you do. This is a fantastic piece of software, and I truly appreciate the hard work that has gone into it.

kovidgoyal
02-15-2008, 02:44 PM
Glad to hear it :)

mazzeltjes
02-23-2008, 08:52 AM
Hi Kovid
First of all a big thanks for this prog
It's amazing and the new bulk conversion tool
is what I've been waiting for.
One little question bugs me though
How to select multiple books under xp
I can't more than one book selected at the time
:chinscratch: :chinscratch: :chinscratch:
I hope you can enlighten me here

LOL2005
02-23-2008, 09:24 AM
Hello

Has anyone made a custom fetch profile to get news from French newspapers?
www.lemonde.fr
www.libe.fr
www.lefigaro.fr

Thanks,

kovidgoyal
02-23-2008, 12:55 PM
Press the shift key and click.

mazzeltjes
02-23-2008, 02:56 PM
Press the shift key and click.
click what ?

kovidgoyal
02-23-2008, 03:00 PM
Each book you want selected.

mazzeltjes
02-23-2008, 03:14 PM
:iloveyou::iloveyou::iloveyou:
YYYYYEEEESSSS
Works
Looks good
Simple
Forever indebted I Am
:bulb2::bulb2::bulb2::bulb2:
Maybe it would be a good idea
if somebody
wrote a little manual
for people like me
that ain't that familiar
with shortcuts
& command lines
simple people like me
that just wanna read
not program
simple people like
me
:):):):):)

kovidgoyal
02-23-2008, 03:20 PM
As a matter of fact, I'm in the process of writing a manual :)

mazzeltjes
02-23-2008, 03:23 PM
As a matter of fact, I'm in the process of writing a manual :)
:bookworm::bookworm::bookworm::bookworm:
says
:thanks::thanks::thanks::thanks::thanks::thanks:

mazzeltjes
02-23-2008, 03:41 PM
:bookworm::bookworm::bookworm::bookworm:
says
:thanks::thanks::thanks::thanks::thanks::thanks:
But........
lets say
I want
to convert
400 files
in one go
do I select
400 files
by clicking
1 by 1
or is there
a way
to grab
them all
in one
simple
motion?
:chinscratch::chinscratch::chinscratch:

kovidgoyal
02-23-2008, 03:45 PM
At least on linux if you click one file and then Shift+click another several rows below it all the intervening files are selected.

AnemicOak
02-23-2008, 03:57 PM
At least on linux if you click one file and then Shift+click another several rows below it all the intervening files are selected.

It's the same in Windows.

mazzeltjes
02-23-2008, 04:01 PM
:thumbsup::thumbsup::thumbsup::thumbsup::thumbsup:
that's why I need
people
like Ye
(and a manual)
so bad
:thumbsup::thumbsup::thumbsup::thumbsup:

mazzeltjes
02-23-2008, 04:07 PM
At least on linux if you click one file and then Shift+click another several rows below it all the intervening files are selected.
Yes.....
but then I still
have to click
400 files
separately
to get them
converted
I....Think
EDIT
:smack::smack::smack::smack::smack:
JUST REALISED
i HAVE TO
CLICK
THE BULK CONVERSION
THINGY
:smack::smack::smack::smack::smack:

Cthulhu
02-23-2008, 06:45 PM
Kovid:

Looking over some of the posts for LIBPRS, realised that I have a very early version of the software. Is there any auto-update function that I should enable, or am I simply lazy for not watching for updates posted here at Mobile Read?

@ anyone: Will downloading the program from libprs.net override my older version?

kovidgoyal
02-23-2008, 06:48 PM
Newer version of the software notify you when there is an upgrade available. And yes installing a new version should overwrite the old.

Cthulhu
02-23-2008, 06:50 PM
thanks Kovid. Am off to update my version. ;-)

OUTATIME
02-25-2008, 12:09 PM
I'm having problems with the lit to lrf conversion, so far none of the lit files I've tried have converted.

---------------------------------------------------------------------------------

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 0: character maps to
Failed to perform job: Convert book:Star Trek-Shatner Series-03-Avenger
Detailed traceback:
Traceback (most recent call last):
File "parallel.py", line 95, in run_job
File "libprs500\ebooks\lrf\any\convert_from.pyo", line 143, in main
File "libprs500\ebooks\lrf\any\convert_from.pyo", line 120, in process_file
File "libprs500\ebooks\lrf\lit\convert_from.pyo", line 95, in process_file
File "libprs500\ebooks\lrf\html\convert_from.pyo", line 1733, in process_file
File "libprs500\ebooks\lrf\html\convert_from.pyo", line 259, in __init__
File "libprs500\ebooks\lrf\html\convert_from.pyo", line 355, in add_file
File "libprs500\ebooks\lrf\html\convert_from.pyo", line 313, in preprocess
File "libprs500\ebooks\BeautifulSoup.pyo", line 1438, in __init__
File "libprs500\ebooks\BeautifulSoup.pyo", line 1058, in __init__
File "libprs500\ebooks\BeautifulSoup.pyo", line 1090, in _feed
File "libprs500\ebooks\lrf\__init__.pyo", line 332, in entity_to_unicode
File "encodings\cp1252.pyo", line 15, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 0: character maps to
Log:
[DEBUG] convert_from.pyo:42: clit "c:\users\eddieb~1\appdata\local\temp\libprs500_0.4 .35_fk2kph.lit" "c:\users\eddieb~1\appdata\local\temp\libprs500_f2g 2aj\\"
[INFO] convert_from.pyo:46:
[INFO] convert_from.pyo:348: Processing c:\users\eddieb~1\appdata\local\temp\libprs500_f2g 2aj\Star Trek-Shatner Series-03-Avenger.htm
[INFO] convert_from.pyo:301: Parsing HTML...

kovidgoyal
02-25-2008, 12:17 PM
First upgrade to the latest version of libprs500. If it still doesn't work send me the lit file.

OUTATIME
02-25-2008, 12:27 PM
Thank you Sir, much appreciated.

And thank you again for the wonderful program; it was the deciding factor when it came to buying the Sony Reader. Without Libprs it wouldn't be used half as much.

OUTATIME
02-25-2008, 02:12 PM
This is the most recent file I tried; but I have had pretty much the same experience with all of them.

kovidgoyal
02-25-2008, 02:36 PM
This bug will be fixed in the next release.

OUTATIME
02-25-2008, 03:51 PM
Good man, cheers.

joeanne12
02-27-2008, 10:03 AM
sorry to bother you but all I have figured out how to do is reply to thread. I have a problem with converting lit files and would like to ask for help but dont know how, can you help? thanks

JSWolf
02-27-2008, 11:27 AM
sorry to bother you but all I have figured out how to do is reply to thread. I have a problem with converting lit files and would like to ask for help but don't know how, can you help? thanks
What sort of problems are you having? If you describe in more detail just what is and is not working and what it is you are trying to do, someone may be able to help.

gwynevans
02-27-2008, 11:55 AM
sorry to bother you but all I have figured out how to do is reply to thread.
You need to move up a level to the list of threads in a forum, then the button up on the left ("New reply" in a thread) becomes "New thread".

joeanne12
02-28-2008, 08:06 PM
when converting my lit files I am getting either double spacing, or one full page and then one half page through the whole book or one or two words on every second line! some have converted fine so I dont know if I have to change setting for particular books.
Thanks so much for your help

JSWolf
02-28-2008, 08:19 PM
Are these purchased LIT or from another source?

joeanne12
02-28-2008, 11:42 PM
Both, when I open them in Microsoft reader they are fine. Also I quit often get a OPF file the first time I convert instead of a BBeB book file. If I redo the convert it is usually fine.
I have version 0.4.38 is this the latest version? Thanks again for the help

maccow
02-29-2008, 09:52 PM
Hi, First of all thanks for the fantastic program and I have been used it for a while to get newspapers like NYT. However, for the past few builds of the program, I could not get the newspapers anymore (the hourglass runs forever and I monitored the traffic via my firewall and believe the downloading part works fine). It seems to me the program is stucked somewhere while formating the file. Any suggestions? BTW, I have WinXP/SP2.

Again, thanks

kovidgoyal
02-29-2008, 10:14 PM
At a terminal run


web2lrf --verbose newsweek


to see where it is getting stuck. Replace --newsweek with whatever newspaper you use. web2llrf --help will give you a list.

maccow
03-01-2008, 07:04 AM
At a terminal run


web2lrf --verbose newsweek


to see where it is getting stuck. Replace --newsweek with whatever newspaper you use. web2llrf --help will give you a list.
Thanks a lot kovidgoyal, I tried the commandline web2lrf first with newsweek and it worked really well. Swich back to libprs500 and try to fetch newsweek. It worked as well but a bit slower. So I tried the NYT again and got the NYT eventually but it takes a LONG time. So, it works after all but I just have to be patient. Again, thank you.

joeanne12
03-05-2008, 12:27 AM
Hi I dont know anything about command line stuff, Iam using the GUI. It is fantastic thanks but now all my lit files are converting to OPF files!! what are these files and why am I getting them.
Thanks for any help.

kovidgoyal
03-05-2008, 12:38 AM
Interesting attach one of these lit files

JSWolf
03-05-2008, 12:48 AM
Both, when I open them in Microsoft reader they are fine. Also I quit often get a OPF file the first time I convert instead of a BBeB book file. If I redo the convert it is usually fine.
I have version 0.4.38 is this the latest version? Thanks again for the help
The latest version is 0.4.40.

What you are doing is exploding the LIT into it's component parts. What you should be doing is just removing the DRM and then taking the DRM free LIT and running lit2lrf against it. In most cases that will work fine. And to do at least some of this, you will have to use the command line.

Deputy-Dawg
03-15-2008, 01:53 PM
Kovid,
I have run into an oddity with lit2lrf. I have a lit file with the DRM removed. When I convert it either from the Mac GUI or the Mac terminal I get a .lrf file in which the line spacing increases by one line height with every new paragraph. By the time you get to the end of the document there is one line per page, and it is a short teaser file. I can only imagine what it would be like if it were a full book.

I then used clit to create a HTML file and then used both the GUI and command line versions of html2.lrf. The GUI simply produced a document that I could not open in the viewer. The command line resulted in a file that was only 28kb in length (I would have expected something about 100k) and the following messages in my terminal.

Last login: Sat Mar 15 12:26:38 on ttys000
Macintosh-3:~ billc$ cd desktop/ow
Macintosh-3:ow billc$ html2lrf --verbose index.1252.html
[INFO] convert_from.pyo:359: Processing /Users/billc/Desktop/OW/index.1252.html
[INFO] convert_from.pyo:312: Parsing HTML...
[INFO] convert_from.pyo:347: Written preprocessed HTML to /var/folders/pK/pK4oxuulGwSmGODViAxxxk+++TI/-Tmp-/html2lrf-verbose.html
[INFO] convert_from.pyo:373: Converting to BBeB...
[INFO] convert_from.pyo:294: Rationalizing font sizes...
Traceback (most recent call last):
File "/Users/billc/Downloads/libprs500.app/Contents/Resources/html2lrf.py", line 9, in <module>
main()
File "libprs500/ebooks/lrf/html/convert_from.pyo", line 1859, in main
File "libprs500/ebooks/lrf/html/convert_from.pyo", line 1770, in process_file
File "libprs500/ebooks/lrf/html/convert_from.pyo", line 1662, in writeto
File "libprs500/ebooks/lrf/pylrs/pylrs.pyo", line 629, in renderLrf
File "libprs500/ebooks/lrf/pylrs/pylrf.pyo", line 716, in writeFile
File "libprs500/ebooks/lrf/pylrs/pylrf.pyo", line 751, in writeObjects
File "libprs500/ebooks/lrf/pylrs/pylrf.pyo", line 557, in write
File "libprs500/ebooks/lrf/pylrs/pylrf.pyo", line 392, in write
File "libprs500/ebooks/lrf/pylrs/pylrf.pyo", line 84, in writeSignedWord
File "struct.pyo", line 63, in pack
File "warnings.pyo", line 62, in warn
File "warnings.pyo", line 102, in warn_explicit
DeprecationWarning: 'h' format requires -32768 <= number <= 32767
Macintosh-3:ow billc$


And I haven't a clue as to what to try next.

kovidgoyal
03-15-2008, 03:16 PM
Send me the lit file

Deputy-Dawg
03-15-2008, 03:59 PM
Send me the lit file

How? To what address?

kovidgoyal
03-15-2008, 04:45 PM
Attach it to a ticket or kovid at kovidgoyal.net

greylin
03-20-2008, 12:01 PM
My new AV program (Comodo) has just quarantined a trojan, Backdoor.Win32.Small.iu found in /libprs500/qtcore4.dll and of course libprs500 now won't open. Erm .. help?

The Old Man
03-20-2008, 12:20 PM
The free AVG AV program has no problem with it.

Uninstall Comodo and reinstall libprs500.

greylin
03-20-2008, 01:37 PM
The free AVG AV program has no problem with it.

Uninstall Comodo and reinstall libprs500.

What, on the grounds that AVG is infallible? I don't think so! But thank you for the suggestion. :)

I've now submitted the .dll file to some online virus scanners that all report it as clean so I've felt confident enough to unquarantine it and libprs500 is working fine again.

JSWolf
03-23-2008, 05:34 PM
What, on the grounds that AVG is infallible? I don't think so! But thank you for the suggestion. :)

I've now submitted the .dll file to some online virus scanners that all report it as clean so I've felt confident enough to unquarantine it and libprs500 is working fine again.
Comodo is giving a false positive. I've never have AVG Free give a false positive with Libprs500. I suggest you contact the people behind Comodo and tell them of this glitch in their virus definitions and hope they'll fix it.

greylin
03-23-2008, 08:10 PM
Comodo is giving a false positive. I've never have AVG Free give a false positive with Libprs500. I suggest you contact the people behind Comodo and tell them of this glitch in their virus definitions and hope they'll fix it.

Yep, Comodo submitted the file automatically for online evaluation and learning so the database should soon recognise Libprs500 as a safe program.

=X=
04-03-2008, 12:59 PM
Hi kovidgoyal,
I'm having trouble with the conversion of a LIT book I bought. Note for the most part I have not had any issues with conversions in the past. However this book as a lot of formating and it seems to cause the LIT tool some grief.

I

JSWolf
04-03-2008, 01:02 PM
Can you post the error(s) for get if you get any?

=X=
04-03-2008, 01:32 PM
I'm not getting errors the conversion works. What happens however is the fonts are and formatting are all over the place. Font sizes tend to be about 14 points which is huge on the reader. Also some images in the do not scale correctly and are blown up to about 300% their original size.

Typically one can change the default font size when converting a LIT book to LRF but the font sizes are getting ignored.


I can post a screen shot of if this will help

Also the lit conversion increase the file size to 18MB. When I convert the LIT to an html then convert the HTML2LRF the size is only 4MB and the formatting commands did work correctly

JSWolf
04-03-2008, 02:31 PM
I'm not getting errors the conversion works. What happens however is the fonts are and formatting are all over the place. Font sizes tend to be about 14 points which is huge on the reader. Also some images in the do not scale correctly and are blown up to about 300% their original size.

Typically one can change the default font size when converting a LIT book to LRF but the font sizes are getting ignored.


I can post a screen shot of if this will help

Also the lit conversion increase the file size to 18MB. When I convert the LIT to an html then convert the HTML2LRF the size is only 4MB and the formatting commands did work correctly
Suggestion, go to the libprs500 site and post a ticket and attach the LIT file for it can be looked at and if it is a lit2lrf issue it can be fixed.

Pendergast
04-24-2008, 06:31 AM
Hello.

Has anyone been able to install it on Mandriva?. I'm not good enought to compile yet.
thanks

astra
05-02-2008, 04:59 AM
Hi. I am new to this thread :)

It looks like libprs500 has improved tremendously! I tried it about 1 year ago and hardly recognised it today.

I am trying to learn how to use libprs500 for converting lit files.
I am using GUI version.
Is it possible to add footers that shows what chapter I am currently reading? In the settings I have found a box where I can add/remove a tick for having headers but didn't find anything for footers.
Is it possible to have both eBook Library and libprs500 to be installed on the same PC and use eBook Library for preview lrf files and uploading them to the readers and at the same time to use libprs500 for converting files?

Thanks, Astra.

kovidgoyal
05-02-2008, 06:56 AM
No footers are not supported. Yes you can use both. Just dont use both to transfer files to the reader.

astra
05-02-2008, 06:59 AM
Yes you can use both. Just dont use both to transfer files to the reader.


So, if I install prs500 on my PC it will notconflict with eBook Library? or is there a specific order in which one should be installed first?

kovidgoyal
05-02-2008, 07:01 AM
When you install libprs500, just dont install the drivers (they are not installed by default).

astra
05-02-2008, 07:04 AM
When you install libprs500, just dont install the drivers (they are not installed by default).

Ah, OK. I have seen the option.
Thanks a lot!

I am not sure I can live without footers but I am pretty sure my wife doesn't notice them :) So, I believe I will use libprs500 to convert purchased lit files formy wife. The automatic process is a lot better than BD if I don't want to edit anything manually.

MonRoe
05-18-2008, 09:56 AM
We bought a Sony500, but we found out today that it is not possible for us to buy books at the sony store.
Within 4 days we are going on a holiday for 5 weeks and we want some books.

We read a lot here and saw this topic. We installed everything, downloaded a cheap book at ebooks.com to try it out with .lit extension. Everything went well, we have now an nice .lrf book.

BUT, we bought two other books and we cannot do LitConverter anymore, we get the message after open the .lit file ; it is not possible to make a directory or the directory already excist. We tried several different way's also restarted the computer etc, but nothing helps.

We already spent 50 dollar for books we can't use at this moment.

Who can help us?????????

MonRoe
05-18-2008, 11:02 AM
after trying out a lot of things, installing clit.exe again, we managed to get the html files on our harddisk.

For one book we have more then 40 html drives, how can we get that into one .lrf file?

pilotbob
05-18-2008, 12:45 PM
after trying out a lot of things, installing clit.exe again, we managed to get the html files on our harddisk.

For one book we have more then 40 html drives, how can we get that into one .lrf file?

Rather than exploding the lit files into html files... you should downconvert it. This way it remains in .lit package and then calibre can convert it to an .lrf.

Run convertlit at the command line with no parameters and it will give you help on this stuff. This of course assumes that you have created your keys file.

BOb

JSWolf
05-18-2008, 12:53 PM
Since they can explode the LIT, then they have it configured correctly. They just need to learn to just remove the DRM and leave a DRM free LIT.

If you need any help with lit2lrf, just ask and we'll be happy to help.

MonRoe
05-20-2008, 02:24 PM
Thanks for your help sofar. Within 2 days we are going on a holiday for 5 weeks to Greece. After our holiday we will look into the problem how to convert the files on the right way.

AnemicOak
06-03-2008, 12:42 AM
Anybody had any problems with new release lit's they've bought (released in the last couple weeks)? I'm not sure if this is a lit2lrf problem or a Convert Lit problem.

I've got two I just bought that were released today. Things seem to go fine with Convert Lit. When I bring them into Calibre they're added to the library, but none of the meta info comes through. Instead it lists the path to the file for the title & unknown for the author.

When trying to convert I get...
ConversionError: Error reading file "c:\users\brian\appdata\local\temp\calibre_0.4.67_a fvbur.lit" -- Unbalanced HTML - extra ending tag at position 2206.Error reading file "c:\users\brian\appdata\local\temp\calibre_0.4.67_a fvbur.lit" -- ERROR - Failure during tag expansion of "/meta" Code: -1!
Failed to perform job: Convert book:Julius House
Detailed traceback:
Traceback (most recent call last):
File "parallel.py", line 139, in run_job
File "calibre\ebooks\lrf\any\convert_from.pyo", line 161, in main
File "calibre\ebooks\lrf\any\convert_from.pyo", line 134, in process_file
File "calibre\ebooks\lrf\lit\convert_from.pyo", line 52, in process_file
File "calibre\ebooks\lrf\lit\convert_from.pyo", line 43, in generate_html
ConversionError: Error reading file "c:\users\brian\appdata\local\temp\calibre_0.4.67_a fvbur.lit" --
Unbalanced HTML - extra ending tag at position 2206.Error reading file "c:\users\brian\appdata\local\temp\calibre_0.4.67_a fvbur.lit" --
ERROR - Failure during tag expansion of "/meta" Code: -1!

Log:
[DEBUG] convert_from.pyo:32: clit "c:\users\brian\appdata\local\temp\calibre_0.4.67_a fvbur.lit" "c:\users\brian\appdata\local\temp\calibre_rr40ax\\"
[INFO] convert_from.pyo:36:


Both books I tried did the same thing. Also if I try to explode the file with ConvertLit instead I just get a bunch of 0kb files. Also when opening the Lit in Book Designer I just get the title & author repeated about a dozen times, but no other text. The converted lit opens fine with MS Reader.

Like I said, not sure if this is a lit2lrf problem really since other apps seem to be having trouble too, but if anyone has any ideas I'd appreciate it.

astra
06-03-2008, 06:32 AM
So, you have successfully removed DRM? Have you tried to upload it to BD?

AnemicOak
06-03-2008, 09:22 AM
So, you have successfully removed DRM? Have you tried to upload it to BD?

Yes, DRM is removed. Yes, as I said in my post when I open it with BD all I get is the Author & Title repeated about a dozen times, no other text. A few other folks I've talked to have apparently had the same issue in the last few weeks (these are all new release titles). All the books were from Penguin labels so I don't know if they've changed something in the way they're creating them or what. Pretty important to figure out since Penguin puts out so many books. If there's something about their newer files that mean no conversion it'll mean less books I'll be buying.


EDIT: Just tried it on my work computer & get the same issues. Also tried using the Clit command line to explode the Lit (last night I used the LitConverter.exe) and get the same 0kb files along with the following error...
Unbalanced HTML - extra ending tag at position 2206

ERROR - failure during tag expansion of "/meta" Code: -1!

astra
06-03-2008, 09:47 AM
I am sorry, my bad about missing your mention of BD.

What you are saying it pretty scaring. The only legitimate and acceptable source of ebook files is LIT format. If they mess it they will loose my money, darknet is always around the corner.

I bought 2 books 2 weeks ago when fictionwise 8 year Birthday party started. Both of them were converted without any problems but I don't think they were from penguin. I will have a look at it a bit later.

astra
06-03-2008, 10:01 AM
One is Orbit[Somers, Jeff - The Electric Church] and another is HarperCollins[Gentle, Mary - A Sundial in a Grave 1610]. But they are not brand new books that were published only recently.

AnemicOak
06-03-2008, 10:19 AM
One is Orbit[Somers, Jeff - The Electric Church] and another is HarperCollins[Gentle, Mary - A Sundial in a Grave 1610]. But they are not brand new books that were published only recently.

Yeah, I haven't had any problems with older titles (even as 'old' as about a month, it's just stuff from the last couple weeks). I've bought over 200 LIT's and this is the first time I've had a problem.

kovidgoyal
06-03-2008, 02:29 PM
You should check if these files work with an older release of the microsoft reader.

AnemicOak
06-03-2008, 03:19 PM
You should check if these files work with an older release of the microsoft reader.

Anyone know where I can get a copy (looks like 2.0 was the first version for XP & 1.5 is the only other version)? The only thing I can find everywhere is 2.1.1 which I've tried them on with two computers & they worked fine. I also put them on my Treo which has the Windows Mobile version 2.4.1 and they work fine there too.

kovidgoyal
06-03-2008, 03:23 PM
You can also try pinging the convertlit author

AnemicOak
06-03-2008, 03:48 PM
Yeah, I've dropped a line.

astra
06-04-2008, 04:31 AM
Did you solve the problem?

simond
06-04-2008, 06:27 AM
I had the same problem with Galactic North bought from Fictionwise recently, DRM removed fine but convertlit can't decode it, no response from convertlit author yet

AnemicOak
06-04-2008, 09:48 AM
Did you solve the problem?

Nope. Haven't heard back from the ConvertLit author yet.

Still trying to think of other programs to open the file with to get it into a format I can dump into BD or something. When I get a chance I think I might try & see if Stanza (the new Mac program) can convert it to something else (maybe Mobi) that I can then convert.

AnemicOak
06-04-2008, 12:38 PM
Just bought another book that came out this week. Same problem. Also add the Process Text converter to programs that can't open the files. lit2mobi (from Mobiperl) doesn't work either, but I'm pretty sure that uses ConvertLit for part of its process.


It's another title from a Penguin label just like all the other I and others I've talked to have had problems with. :shrugs:


I'm a little scarred to buy anymore until/unless I can figure this out.

kovidgoyal
06-04-2008, 01:23 PM
Can somebody send me one of these files?

astra
06-04-2008, 01:57 PM
I cannot. I don't have any of the problematic files.

My MS reader is v2.1.1.

AnemicOak
06-04-2008, 02:17 PM
Can somebody send me one of these files?

I just emailed you two of them.

AnemicOak
06-04-2008, 08:22 PM
Ok, tried some Mac stuff too.

Tried Calibre, no luck (didn't expect it to work since the Windows version didn't).

Tried Stanza, can't open the files.

Tried MacLit, can't open (get 0 pages).


I didn't figure any of those would work, but figured I'd try them anyway.

MidknytOwl
06-05-2008, 12:23 AM
Nevermind

kovidgoyal
06-05-2008, 12:28 AM
The problem with those lit files is that they have invalid OPF files (some missing tags) and convertlit chokes on this. A simple patch to convert lit fixes this, but I'm not familiar enough with it to say what other side effects the patch might have. The patch is in the file litembiggen.c , change line 342 to


if (0 && !depth) {

simond
06-05-2008, 12:38 AM
Can somebody send me one of these files?

I already have as part of the ticket which (understandably) got closed on the calibre website (#718)

AnemicOak
06-05-2008, 01:31 AM
The problem with those lit files is that they have invalid OPF files (some missing tags) and convertlit chokes on this. A simple patch to convert lit fixes this, but I'm not familiar enough with it to say what other side effects the patch might have. The patch is in the file litembiggen.c , change line 342 to


if (0 && !depth) {


Thanks for the info



I assume this would be edited in the Source Code you can download. I've got that edited, but can anyone tell me if there's an easy way to compile the source into an exe like the one you download (or is there a way to edit the file from within the compiled exe?). Sorry for what's probably a dumb question, but I'm more a graphics guy so have little idea on the programing end of things.

AnemicOak
06-05-2008, 04:10 PM
Ok, after some research I downloaded & installed Visual C++ Express Edition 2008 (Visual C++ version 9). When I try to run nmake -f win32.mak like the readme for C-lit says I get the error...
NMAKE: fatal error U1100: macro '$*' is illegal in the context of batch rule '.c.obj'


Since the readme seemed to indicate the author was using version 7 I tried to find that, but couldn't. Version 8 (2005) gives the same errors as version 9.


:shrugs: I guess I'll hope to hear back from the author of the program, because I'm way over my head trying to compile this stuff.

kovidgoyal
06-05-2008, 06:09 PM
I've added the patched convertlit to calibre, redownload 0.4.68 and try

AnemicOak
06-05-2008, 07:16 PM
I've added the patched convertlit to calibre, redownload 0.4.68 and try

Thanks very much. It works like a charm. :thumbsup:

simond
06-09-2008, 06:09 AM
I've added the patched convertlit to calibre, redownload 0.4.68 and try

Works fine for me too so far, thanks!

Smashingblue
06-12-2008, 03:41 AM
I've managed to convert a lit to lrf, but I can't figure a way to prevent the lrf from having excessive spacing between words.

Can anyone explain to me how to fix the spacing issue when converting a lit to lrf?

astra
06-12-2008, 04:12 AM
What base font size do you use and when you read what text size do you use on the reader i.e. small, medium or large?

Smashingblue
06-12-2008, 10:01 AM
What base font size do you use and when you read what text size do you use on the reader i.e. small, medium or large?

I use calibre to do the converting with a 12 point font size, 2.5 point font spacing, and I usually read on the small setting.

I haven't done anything with changing the 12 point font size, but have lowered the 2.5 point font spacing, which helps in some ares, but others ends up making the words way too close together.

astra
06-12-2008, 10:16 AM
First of all try to use base font size 10.

Second, it is a Sony Reader or LRF format problem. It tries to accomodate words that are placed in one line all over the length of the screen (I am not sure I explain clear, sorry about it). It means the bigger font size you use, the smaller number of words that fit in one line, the more space will be allocated to fill in the space between them(words).

Smashingblue
06-12-2008, 10:40 AM
First of all try to use base font size 10.

Second, it is a Sony Reader or LRF format problem. It tries to accomodate words that are placed in one line all over the length of the screen (I am not sure I explain clear, sorry about it). It means the bigger font size you use, the smaller number of words that fit in one line, the more space will be allocated to fill in the space between them(words).

That helped a little bit, but still a bit odd with the spacing. Guess there is no easy fix for the spacing when converting from lit to lrf.

astra
06-12-2008, 10:49 AM
That helped a little bit, but still a bit odd with the spacing. Guess there is no easy fix for the spacing when converting from lit to lrf.

I don't think it matters whether you convert from lit, rtf, html or anything else.

Amalthia
07-16-2008, 06:08 PM
I used Calibre to convert a LIT file and for some reason all the italics were removed. I'm not sure what I'm doing wrong?

kovidgoyal
07-16-2008, 08:24 PM
open a ticket and attach the lit file to it.

Amalthia
07-16-2008, 08:51 PM
open a ticket and attach the lit file to it.


Okay, I'll take this advice as a sign that you really don't have to do something extra to make sure italics/bolded survive the conversion process.

I'm going to test again tonight and open a ticket like you advise. thanks.

Amalthia
07-17-2008, 03:01 PM
Update on missing italics. When I saved the LRF to disk and viewed using the Sony Connect Software all the italics were there. Earlier I was viewing the new LRF files via the Calibre LRF viewer and for some reason non of the italics were showing there. I'm not sure if this is a bug or not.

kovidgoyal
07-17-2008, 03:22 PM
Odd. Probably just the fonts in the LRF viewer make it look like its not italic?

JSWolf
07-17-2008, 03:45 PM
I've just viewed a book with Calibre's LRV viewer and I get italics just fine. Could it be that whatever font the viewer is using that there is no italic version to go with it?

seajewel
07-17-2008, 03:59 PM
this might not be quite the correct place to pose this question (which might have come up before?) but it's relevant to the current discussion.. anyways, I noticed that when I replaced the Windows/Font versions of ttm****.ttf or whatever the Sony default fonts were with my Korean-ified versions, Calibre displays a bizarre different font for Korean in the lrf viewer and in the Calibre gui. It's definitely not the one that my Reader now uses (After the unicode patch). Things show up fine in the reader, but I was wondering why Calibre shows a different font than the one I used in the Sony Reader, in the Reader directory, and in the Windows Fonts directory. Is there someplace in calibre I'm supposed to replace fonts in as well?

kovidgoyal
07-17-2008, 05:36 PM
yeah calibre has a private copy of the fonts. Unfortunately replacing them in non-trivial.

Amalthia
07-17-2008, 08:42 PM
I've just viewed a book with Calibre's LRV viewer and I get italics just fine. Could it be that whatever font the viewer is using that there is no italic version to go with it?

In the settings, I have all the fonts set to Arial. What are your's set at? I'd love to be able to use the Calibre viewer because it removes 2 steps in checking the conversion.

edited to add: forgot to add the LIT files I'm using look like Times New Roman and in the viewer that's what I'm seeing. For some reason it's not converting the fonts to Arial. But I'd think that Times New Roman would show italics.

kovidgoyal
07-17-2008, 08:56 PM
I dont embed fonts, I find the hit in page turn times to be too great.

matt richerd
07-22-2008, 12:58 AM
I am new to Mobile read and to Linux in general and I use this site. Everyone can transfer your data from mobile read to laptop.
_____________________
Matt Richard
Wide Circles (http://www.widecircles.biz"rel="dofollow)

kovidgoyal
07-22-2008, 12:15 PM
I'm not sure what you mean

vivek_cbe
07-28-2008, 08:28 AM
I find that the "sort by author" is not working properly. I am using 0.4.80 version of calibre. Is this a known issue?

kovidgoyal
07-28-2008, 11:19 AM
sort by author operates on two fields the author sort field and and if that is empty the author field. Make sure that the author sort field is correct for books that appear to be sorting incorrectly.

vivek_cbe
07-28-2008, 02:05 PM
thanks Kovid. Works well now. Will keep playing with the tool in the mean time.

vivek_cbe
07-29-2008, 03:11 PM
Hi

I downloaded an epub file from Adobe DE site. When I tried to add it to Calibre's library, I get the following error:

not an .epub OCF container
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 445, in add_books
File "main.py", line 457, in _add_books
File "calibre\ebooks\metadata\meta.pyo", line 71, in get_metadata
File "C:\Program Files\calibre\library.zip\calibre\ebooks\metadata\ epub.py", line 96, in get_metadata
File "C:\Program Files\calibre\library.zip\calibre\ebooks\metadata\ epub.py", line 80, in __init__
File "C:\Program Files\calibre\library.zip\calibre\ebooks\metadata\ epub.py", line 59, in __init__
EPubException: not an .epub OCF container

Any Idea what the issue could be ? Has it something to do with DRM?

llasram
07-29-2008, 03:32 PM
Any Idea what the issue could be ? Has it something to do with DRM?

You should only get that that error when the file isn't actually an EPUB book at all, DRMed or not. Are you sure the file is in fact an EPUB book?

vivek_cbe
07-30-2008, 04:38 AM
You should only get that that error when the file isn't actually an EPUB book at all, DRMed or not. Are you sure the file is in fact an EPUB book?

well, the file extension is ".epub". After installing Adobe DE, the file extenstion ".epub" has been associated with this program. Other files open inside Adobe DE.

I am not sure how to check if the file is indeed an epub document. Any suggestions?

llasram
07-30-2008, 09:10 AM
well, the file extension is ".epub". After installing Adobe DE, the file extenstion ".epub" has been associated with this program. Other files open inside Adobe DE.

I am not sure how to check if the file is indeed an epub document. Any suggestions?

Does this particular file open in ADE? If so, e-mail me a copy (<llasram@gmail.com>) -- even if it's DRMed calibre should still be able to read the metadata.

vivek_cbe
07-30-2008, 12:16 PM
Yes llasram. the file opens fine in ADE. I will mail you the file right away.

JSWolf
08-05-2008, 04:48 PM
I don't embed fonts, I find the hit in page turn times to be too great.
Actually, I did try embedding Times New Roman in something and the page turns are fast now. They do not take the long time they used to. Embedding fonts now is actually good. Page turns are not too slow like they used to be.

JSWolf
08-10-2008, 03:55 PM
I'm using 0.4.83 and when I use lit2lrf, I get no italics at all. I've gone back to some earlier version and italics are fine.

llasram
08-10-2008, 04:57 PM
I'm using 0.4.83 and when I use lit2lrf, I get no italics at all. I've gone back to some earlier version and italics are fine.

Hmm. There's no change in the HTML->LRF conversion code between versions 0.4.82 and 0.4.83. Kovid did switch the default for lit2lrf extraction from ConvertLIT to lit2oeb, but I'm not sure what sort of bug could cause just italics to fail. Could you e-mail me a book showing this behavior?

JSWolf
08-10-2008, 05:29 PM
Odd... it's now working fine. I don't know why it wasn't working before.

ould
09-05-2008, 11:54 PM
Hi there,

New to the forum. Currently researching e-book readers now that I am taking the bus to/from work. I came across your software as I was looking into the Sony PRS505. anyways I have a bunch of lit files, not sure where they came from originally but I tried to convert one using your lit2lrf utility but it is spitting back on error. I am using the latest version from bzr and do have ConvertLIT installed as well(I think that was mentioned as needed.) Here is the error output:

Traceback (most recent call last):
File "/usr/bin/lit2lrf", line 8, in <module>
load_entry_point('calibre==0.4.84b9', 'console_scripts', 'lit2lrf')()
File "/usr/lib/python2.5/site-packages/calibre/ebooks/lrf/lit/convert_from.py", line 85, in main
process_file(args[1], options, logger)
File "/usr/lib/python2.5/site-packages/calibre/ebooks/lrf/lit/convert_from.py", line 37, in process_file
tdir = generate_html(lit, logger)
File "/usr/lib/python2.5/site-packages/calibre/ebooks/lrf/lit/convert_from.py", line 26, in generate_html
lr = LitReader(pathtolit)
File "/usr/lib/python2.5/site-packages/calibre/ebooks/lit/reader.py", line 449, in __init__
self._read_drm()
File "/usr/lib/python2.5/site-packages/calibre/ebooks/lit/reader.py", line 647, in _read_drm
msdes.deskey(self._calculate_deskey(), msdes.DE1)
AttributeError: 'NoneType' object has no attribute 'deskey'

Any ideas? FWIW ConvertLIT was able to explode this to a bunch of html files.

Thanks in advance.

Kevin

kovidgoyal
09-06-2008, 01:50 AM
To run from bzr you need to run


python setup.py build && sudo python setup.py develop


Not python setup.py install

ould
09-06-2008, 09:55 AM
To run from bzr you need to run


python setup.py build && sudo python setup.py develop


Not python setup.py install

Thanks! You were correct I was missing the build command. I was still able to use

python setup.py install --root=$pkgdir

I have written a PKGBUILD for the bzr version. PKGBUILD's are used by Arch Linux(my distro of choice) to easily build things from source and still use the package manager to install, uninstall etc, see here for more info PKGBUILD's (http://wiki.archlinux.org/index.php/PKGBUILD). Is there somewhere I could contribute this? I noticed at this link Get Caliber (http://calibre.kovidgoyal.net/download_linux) You have a few distros listed. Maybe you could add Arch to the list. I can try and work out a PKGBUILD for the stable version as well. No worries if you don't want/need it, I just felt like I could contribute something as your software looks to be pretty amazing so far and I don't even have a reader yet!

Thanks for all the hard work!!

Kevin

kovidgoyal
09-06-2008, 10:26 AM
Sure, I'll be happy to add instructions for arch linux. Can you open a ticket and I'll do it when I get some time. Note that a source tarball of the current stable version is always at https://calibre.kovidgoyal.net/downloads/

muņeca
09-14-2008, 07:28 PM
I just used your program over the weekend but it didn't bring over the prolog of the book I was converting it only converted chapter 1 thorugh 21. Just thought I would mention this.

Its a great program by the way. :thanks:

HardBoot
09-25-2008, 10:45 AM
I am converting a pile of .lit files which are typically 0.2 - 0.6 mb in size.

When I convert them I get an .lrf file over 5 mb.

I tried converting one to ePub and got around 0.6 mb (same size as the lit).

Is it normal that the .lrf files are so large?

gwynevans
09-25-2008, 11:21 AM
Is it normal that the .lrf files are so large?

Wouldn't have thought so, but are they full of images or something like that, maybe? My experience is that they're a bit larger, but not much more so.

E.g. Using the MS lit from here (http://www.webscription.net/p-33-black-on-black.aspx), which is 334KB, my conversion gives an LRF of 427KB.

kovidgoyal
09-25-2008, 12:04 PM
The LRF shouldn't be that large.

HardBoot
09-25-2008, 12:42 PM
I loaded and converted Black on Black as suggested and I got an 5.27 mb LRF.

I'm using version 0.4.86 running on Vista Home.

kovidgoyal
09-25-2008, 12:45 PM
Hmm well if you care about it, open a ticket, or just use EPUB :)

HardBoot
09-25-2008, 12:49 PM
I don't really care about it so I'll swop over to ePub. One question...how do I increase the font size in the ePub conversion?

kovidgoyal
09-25-2008, 12:52 PM
you cant. i haven't implemented that feature yet. For some files you could probably achieve the effect you want by using


body {font-size: 14pt}


in the override css field

HardBoot
09-25-2008, 01:08 PM
Great...that's works...so I'll move to ePub. Thanks.

greylin
10-12-2008, 06:44 PM
:help:

('LitError', u'Unable to decrypt title key!'):
Failed to perform job: Convert book: Brisingr (Inheritance, Book 3)
Detailed traceback:
Traceback (most recent call last):
File "parallel.py", line 760, in worker
File "parallel.py", line 729, in work
File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\any\c onvert_from.py", line 167, in main
File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\any\c onvert_from.py", line 137, in process_file
File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\lit\c onvert_from.py", line 37, in process_file
File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\lit\c onvert_from.py", line 26, in generate_html
File "C:\Program Files\calibre\library.zip\calibre\ebooks\lit\reade r.py", line 431, in __init__
File "C:\Program Files\calibre\library.zip\calibre\ebooks\lit\reade r.py", line 624, in _read_drm
LitError: Unable to decrypt title key!
Log:
''

Can anyone help, please? I think I've used the MS reader key recovery tool correctly and I can see the keys.txt file in both the convertlit and calibre folders.

pilotbob
10-12-2008, 10:03 PM
Can anyone help, please? I think I've used the MS reader key recovery tool correctly and I can see the keys.txt file in both the convertlit and calibre folders.

Did you use convertlit to downconvert the book before you imported it into calibre?

BOb

greylin
10-13-2008, 04:35 AM
Did you use convertlit to downconvert the book before you imported it into calibre?

No - I've never had to do this before so it didn't occur to me. Now I've tried it, it works - thank you! I found some useful info at http://dukelupus.pri.ee/convertlit.php.

:thanks:

ak331
10-14-2009, 12:42 AM
I was trying to read lit books and tried monkeying with ms reader and somehow it did not seem to be working and finally found Calibre and now I am happy and content. I am using ubuntu and I do not like windows. :rofl: