Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-06-2007, 08:42 AM   #1
waykohler
Member
waykohler began at the beginning.
 
waykohler's Avatar
 
Posts: 10
Karma: 25
Join Date: Jan 2007
Location: Los Angeles,USA
lit2lrf.exe

Made a command line tool that converts Microsoft reader .lit files to the sony reader .lrf.

I reformat the html inside the .LIT to a layout I like .

Try it out .
It can convert whole directory structures or individual files.

lit2lrf is written in C++ and works as follows.
I use convertlit to extract the html from the lit.
I convert the html to .LRS using my own code.
I compile the LRS to .LRF using lrsparser. LrsParser is faster than lrs2lrf.

It's all done in unicode so non english books should work. But since I dont have anything to test with who knows.

I do not use the DLLs from the Toolbar for LIBRIe. They crash on large html files.

EDIT:
0.2: Hm, that first version was QUITE buggy.

0.3: msvcrt dependencies. I created a new version that is linked with a static libc.

0.4: Vista compability. Also made the tool less verbose.

0.5: Oops, Windows XP compability.

0.6: Support <BR> tag and other minor formating enhancements.

http://www.waykohler.com/lit2lrf/lit2lrf-0.6.zip

Last edited by waykohler; 01-23-2007 at 01:54 AM.
waykohler is offline   Reply With Quote
Old 01-07-2007, 09:44 PM   #2
jbresee
Junior Member
jbresee began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2007
Device: (802) 373-9060
hmmm... cant find clit?

This is a great idea - tried it out, but it errors out 'cant find clit.exe'.

Any idea how to sort this out?
Thanks,
Jim
jbresee is offline   Reply With Quote
Advert
Old 01-07-2007, 09:57 PM   #3
waykohler
Member
waykohler began at the beginning.
 
waykohler's Avatar
 
Posts: 10
Karma: 25
Join Date: Jan 2007
Location: Los Angeles,USA
Quote:
Originally Posted by jbresee
This is a great idea - tried it out, but it errors out 'cant find clit.exe'.

Any idea how to sort this out?
Thanks,
Jim
Im not sure... Try typing the full path to the lit2lrf.

For example: c:\path\lit2lrf ebook.lit

All the 3 executables in the zip needs to be in the same folder.

/Johan
waykohler is offline   Reply With Quote
Old 01-09-2007, 09:20 AM   #4
jbresee
Junior Member
jbresee began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2007
Device: (802) 373-9060
Getting error...

I tried calling out the full path as suggested:

c:\lit2lrf\lit2lrf niven-wrong-way-street.lrf
'/clit.exe' is not recognized as an internal or external command, operable program or batch file.

I'm running Vista... perhaps that's boogering things up a bit?

Thanks,
Jim
jbresee is offline   Reply With Quote
Old 01-09-2007, 11:39 AM   #5
Alexander Turcic
Fully Converged
Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.
 
Alexander Turcic's Avatar
 
Posts: 18,163
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
It works very well for me. Thank you Johan!
Alexander Turcic is offline   Reply With Quote
Advert
Old 01-09-2007, 02:00 PM   #6
waykohler
Member
waykohler began at the beginning.
 
waykohler's Avatar
 
Posts: 10
Karma: 25
Join Date: Jan 2007
Location: Los Angeles,USA
Quote:
Originally Posted by jbresee
I tried calling out the full path as suggested:

c:\lit2lrf\lit2lrf niven-wrong-way-street.lrf
'/clit.exe' is not recognized as an internal or external command, operable program or batch file.

I'm running Vista... perhaps that's boogering things up a bit?

Thanks,
Jim
c:\lit2lrf\lit2lrf niven-wrong-way-street.lrf
That should be .lit not .lrf

I'll try it under vista tonight.

/Johan
waykohler is offline   Reply With Quote
Old 01-10-2007, 12:57 AM   #7
waykohler
Member
waykohler began at the beginning.
 
waykohler's Avatar
 
Posts: 10
Karma: 25
Join Date: Jan 2007
Location: Los Angeles,USA
Quote:
Originally Posted by waykohler
c:\lit2lrf\lit2lrf niven-wrong-way-street.lrf
That should be .lit not .lrf

I'll try it under vista tonight.

/Johan
Jupp, it was vista.
Posted a new version.

/Johan
waykohler is offline   Reply With Quote
Old 01-11-2007, 01:44 PM   #8
waykohler
Member
waykohler began at the beginning.
 
waykohler's Avatar
 
Posts: 10
Karma: 25
Join Date: Jan 2007
Location: Los Angeles,USA
How is the results.

Now that there is a fair amount of people that downloaded this tool.

How's the generated lrf's?
Have you found LIT's that generates bogus LRF's?
Does it work at all?
waykohler is offline   Reply With Quote
Old 01-13-2007, 06:58 PM   #9
jbresee
Junior Member
jbresee began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2007
Device: (802) 373-9060
Thumbs up Works on Vista now!

Thanks so much Johan!!!

Now I can continue to purchase sci-fi books from fictionwise and use them on my reader!

Thanks sooo much,
Jim
jbresee is offline   Reply With Quote
Old 01-14-2007, 05:12 AM   #10
waykohler
Member
waykohler began at the beginning.
 
waykohler's Avatar
 
Posts: 10
Karma: 25
Join Date: Jan 2007
Location: Los Angeles,USA
Quote:
Originally Posted by jbresee
Thanks so much Johan!!!

Now I can continue to purchase sci-fi books from fictionwise and use them on my reader!

Thanks sooo much,
Jim
A bit of a warning Jim. My tool only handles non DRM .LIT files.
If fictionwise protects their files it will not convert.

There is ways to unprotect your files.
This program can be used to do that: http://www.convertlit.com/index.php
The legality of doing the unprotection is described under legal on the site.

/Johan
waykohler is offline   Reply With Quote
Old 01-15-2007, 08:49 AM   #11
jbresee
Junior Member
jbresee began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2007
Device: (802) 373-9060
drm on books I purchase...

Quote:
Originally Posted by waykohler
A bit of a warning Jim. My tool only handles non DRM .LIT files.
If fictionwise protects their files it will not convert.

There is ways to unprotect your files.
This program can be used to do that: http://www.convertlit.com/index.php
The legality of doing the unprotection is described under legal on the site.

/Johan

Thanks for the heads up... DRM makes me crazy. I'm not sharing my unprotected ebooks - just mvoing them to my reader.
The industry seems determined to kill this market before it even gets started!
Thanks again for your work on lit2lrf.
Jim
jbresee is offline   Reply With Quote
Old 01-15-2007, 02:27 PM   #12
Doof
Junior Member
Doof began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2007
Device: PRS-500
This is an awesome piece of work!

Any chance it will support images and TOC in the future?
Doof is offline   Reply With Quote
Old 01-15-2007, 06:17 PM   #13
waykohler
Member
waykohler began at the beginning.
 
waykohler's Avatar
 
Posts: 10
Karma: 25
Join Date: Jan 2007
Location: Los Angeles,USA
Quote:
Originally Posted by Doof
This is an awesome piece of work!

Any chance it will support images and TOC in the future?
Thank you Doof.

TOC:
Yes this is planed.

Images:
The title page will be supported.
Im not so sure about images in the book itself. Hard to do and not in the scope of this tool, use a html converter instead.
waykohler is offline   Reply With Quote
Old 01-22-2007, 11:46 PM   #14
Vaporware
Not here yet.
Vaporware began at the beginning.
 
Vaporware's Avatar
 
Posts: 49
Karma: 11
Join Date: Mar 2005
Location: Atlanta, GA
Device: ETI-2 Ebook Reader
I have used your tool in a long process of converting an HTML page to LRF. I went from HTML->RTF where I stripped some of the formatting->LIT->Lit2LRF->LRF.

Is there a way to handle this document's formatting better? I have looked in each step and lit2LRF makes the largest changes. Obviously the links in the TOC can be stripped out but the appear to have been combined into one large paragraph.

I have included all files generated. Don't worry, they're gutenburg.
Attached Files
File Type: zip CollectedLovecraft.zip (4.79 MB, 942 views)
Vaporware is offline   Reply With Quote
Old 01-23-2007, 01:53 AM   #15
waykohler
Member
waykohler began at the beginning.
 
waykohler's Avatar
 
Posts: 10
Karma: 25
Join Date: Jan 2007
Location: Los Angeles,USA
Quote:
Originally Posted by Vaporware
I have used your tool in a long process of converting an HTML page to LRF. I went from HTML->RTF where I stripped some of the formatting->LIT->Lit2LRF->LRF.

Is there a way to handle this document's formatting better? I have looked in each step and lit2LRF makes the largest changes. Obviously the links in the TOC can be stripped out but the appear to have been combined into one large paragraph.

I have included all files generated. Don't worry, they're gutenburg.
There is lots to be done in lit2lrf. The formating is far from perfect, the only thing it does is change the font size and bold/italic. There is no center or anything like that.

One thing you can do to organize it better is to insert page breaks. It does honor those.

But, there is lots to improve in lit2lrf I just need to find some time.

I did some small changes to support the <BR> tag. And uploaded a new version.

/Johan
waykohler is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where do I get Zip.exe? Tony_A20 ePub 24 01-26-2015 08:23 PM
doc2fb.exe KoopaOne Workshop 2 02-10-2010 01:44 PM
Calibre now includes MS LIT converter: lit2lrf kovidgoyal Calibre 387 10-14-2009 12:42 AM
PRS-500 PRSUtil.exe geekraver Sony Reader Dev Corner 33 07-07-2008 03:40 PM
Using lit2lrf zander_nyrond Sony Reader 10 08-02-2007 02:40 PM


All times are GMT -4. The time now is 11:49 AM.


MobileRead.com is a privately owned, operated and funded community.