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

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 01-29-2008, 04:08 AM   #1
shousa
Groupie
shousa doesn't littershousa doesn't littershousa doesn't litter
 
Posts: 181
Karma: 232
Join Date: May 2006
Errors in .Lit files

Using wordpad I have found a way to quickly "repair" a badly made (as far as I can see) .Lit ebook I bought for over $10 (I have 2 others with the same problem but all the rest, the vast majority, are fine)

Why I thought it needed repairing:
- book designer and lit2lrf would both only generate the first few pages and then stop without an error message.

In a nutshell here is the situation:
- exploded .lit to all it parts (a number of .jpg, html files and 1 opf and i css file and 1 .htm for the cover)
- found that all links (I mean 100%) referred to a .html called XXXfront.html when it should have been XXX.html. So clicking on the links in the html always came back to the xxxfront.html which is a single page with publisher details only.
- i used a find and replace in wordpad to change all the xxxfront.html links to xxx.html and now all the links 100%work....great so far.

My initial thoughts were to:
1) convert the exploded .Lit back to a .Lit for conversion to correct .Lrf
2) or.....convert the exploded files to .Lrf

but I could not find a way to do either.

Am working using Book designer to fix this now - anyone else encountered this?

Last edited by shousa; 01-29-2008 at 04:23 AM.
shousa is offline   Reply With Quote
Advert
Old 01-29-2008, 04:18 AM   #2
shousa
Groupie
shousa doesn't littershousa doesn't littershousa doesn't litter
 
Posts: 181
Karma: 232
Join Date: May 2006
Have used mobicreator which confirms that the original exploded .lit had a massive number of unresolved links but my new version was error free.

Have made a .prc, now looking to convert the .prc to .rtf or something.

Installing converter now
http://www.processtext.com/abcpalm.html

If this pans out it is an easy fix for links that are bad.

Last edited by shousa; 01-29-2008 at 04:33 AM.
shousa is offline   Reply With Quote
Old 01-29-2008, 04:48 AM   #3
shousa
Groupie
shousa doesn't littershousa doesn't littershousa doesn't litter
 
Posts: 181
Karma: 232
Join Date: May 2006
Using the above tools it seems possible to explode a .Lit then edit the .html files then convert to a single .prc then convert back to a .Lit.

The fixed .Lit could then be changed to a .Lrf.

Or could change the .prc to a .rtf - Trying it now.....oops that was a mess!
shousa is offline   Reply With Quote
Old 01-29-2008, 05:17 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 30,536
Karma: 7726331
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just run html2lrf --use-spine on any html file from the .lit file.
kovidgoyal is offline   Reply With Quote
Old 01-29-2008, 09:24 AM   #5
shousa
Groupie
shousa doesn't littershousa doesn't littershousa doesn't litter
 
Posts: 181
Karma: 232
Join Date: May 2006
Quote:
Originally Posted by kovidgoyal View Post
Just run html2lrf --use-spine on any html file from the .lit file.
Damn that totally worked. I now have all 3 books of the History of the decline of the roman empire as .Lrfs - all links, using the find and replace method, now work fine.

They take over 1 hour to load each though (pictures and hundreds of links) using the Lrf viewer.

I chose the Sony Reader for one reason Kovid (over the others) - your support tools are awesome.

Seeing as how that worked with multiple .html files I was wondering whether a website downloaded using HTTrack could be converted to a .Lrf the same way?

I will give it a go anyway!! What fun!! This conversion stuff is generally much faster than ripping CDs!!

Last edited by shousa; 01-29-2008 at 09:28 AM.
shousa is offline   Reply With Quote
Advert
Old 01-29-2008, 02:06 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 30,536
Karma: 7726331
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
look at web2disk and web2lrf
kovidgoyal is offline   Reply With Quote
Old 01-29-2008, 02:37 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 47,240
Karma: 35750367
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by kovidgoyal View Post
Just run html2lrf --use-spine on any html file from the .lit file.
I took a LIT file, expandedit to it's component parts and when I used html2lrf to convert to LRF I ended up with an LRF with no paragraph indents. Any way to sort this so the indents work?

If I convert the unexpanded LIT file, I did get the proper indents.

The command I used was...

Code:
html2lrf --use-spine --left-margin=0 --right-margin=0 --top-margin=0 --bottom-margin=0 --base-font-size=10 --wordspace=1 contents.html
The only command difference is lit2lrf and no --use-spine.
JSWolf is online now   Reply With Quote
Old 01-29-2008, 02:47 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 30,536
Karma: 7726331
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Wow that's strange. lit2lrf basically explodes the lit file and calls html2lrf with the --use-spine option (and any options you pass to lit2lrf). It's probably got something to do with not finding the CSS file. Attach this lit file here.
kovidgoyal is offline   Reply With Quote
Old 01-29-2008, 03:49 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 47,240
Karma: 35750367
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by kovidgoyal View Post
Wow that's strange. lit2lrf basically explodes the lit file and calls html2lrf with the --use-spine option (and any options you pass to lit2lrf). It's probably got something to do with not finding the CSS file. Attach this lit file here.
I'll create a ticket and post it on your site.
JSWolf is online now   Reply With Quote
Old 01-29-2008, 04:16 PM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 47,240
Karma: 35750367
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Ticket #497 created and the LIT attached.

Using version 0.4.34.
JSWolf is online now   Reply With Quote
Old 01-29-2008, 06:26 PM   #11
shousa
Groupie
shousa doesn't littershousa doesn't littershousa doesn't litter
 
Posts: 181
Karma: 232
Join Date: May 2006
Hey JSWolf, have you tried using a .bat file rather than typing it in?

I call it ExplodedLit2Lrf (ExLit2Lrf.bat)

No need to use commandline - just right-click attached .bat file to choose edit then save.

Can double-click from Windows to run.

(finally I have done something worth a tiny bit of karma?)
Attached Files
File Type: bat ExlLit2Lrf.bat (138 Bytes, 290 views)

Last edited by shousa; 01-29-2008 at 06:37 PM.
shousa is offline   Reply With Quote
Old 01-29-2008, 06:53 PM   #12
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 47,240
Karma: 35750367
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by shousa View Post
Hey JSWolf, have you tried using a .bat file rather than typing it in?

I call it ExplodedLit2Lrf (ExLit2Lrf.bat)

No need to use commandline - just right-click attached .bat file to choose edit then save.

Can double-click from Windows to run.

(finally I have done something worth a tiny bit of karma?)
Actually, I think it should be....

Code:
html2lrf --use-spine --left-margin=0 --right-margin=0 --top-margin=0 --bottom-margin=0 --base-font-size=10 --wordspace=1 %1
That way, you can put in the name of the file given that it can be different. Now, that would work very well if in fact it actually worked. The problem is that I don't get paragraph indents. But, your idea for the bat file is a good one to use for lit2lrf especially since I do tent to use the same options.

In this case, the code would be...

Code:
lit2lrf --left-margin=0 --right-margin=0 --top-margin=0 --bottom-margin=0 --base-font-size=10 --wordspace=1 %1
JSWolf is online now   Reply With Quote
Old 01-29-2008, 06:59 PM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 47,240
Karma: 35750367
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
I just remembered another bug with lit2lrf. It doesn't put the ToC in the actual eBook. All you get is the inline ToC. And sometimes they way the ToC is done, it's nice to have it in the actual eBook.

Ticket #498 created.
JSWolf is online now   Reply With Quote
Old 01-29-2008, 07:13 PM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 47,240
Karma: 35750367
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
The indent problem I think I just figured out....

Code:
.para	{
	display: block; 
	margin-bottom: 0%;	
	text-indent:5%;
			}
html2lrf is not respecting the 5%.

But if I replace the 5% with 20px, it works.

Code:
.para	{
	display: block; 
	margin-bottom: 0%;	
	text-indent:20px;
			}
JSWolf is online now   Reply With Quote
Old 01-29-2008, 07:34 PM   #15
shousa
Groupie
shousa doesn't littershousa doesn't littershousa doesn't litter
 
Posts: 181
Karma: 232
Join Date: May 2006
Great JSWolf!

By the way using your options fixed my .lrfs so now they load in a few seconds!

Thanks
shousa 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
iPad .Lit files on the iPad clockworkzombie Apple Devices 4 09-13-2010 06:51 AM
Which format should I convert .lit files to? Joe Schmoo Astak EZReader 16 01-30-2010 12:23 PM
What about LIT files? scylla2 HanLin eBook 6 04-20-2009 06:51 AM
Lit files? Jaie Which one should I buy? 11 02-21-2009 07:52 AM
Converting LIT to LRF Woes (or: Trouble with Images in LIT Files) JEMelby Sony Reader 0 07-27-2007 09:18 PM


All times are GMT -4. The time now is 04:44 PM.


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