Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-03-2006, 09:48 AM   #16
porkupan
Fanatic
porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.
 
porkupan's Avatar
 
Posts: 556
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
Quote:
Originally Posted by scotty1024
I could never get the Librie to eat more than 16MB of LRF. Perhaps the library knows this and cuts you off.
Well, actually these HTML files are not even close to 16MB. More like 600KB. Very well structured HTML, autogenned from FB2...

In fact, the Sony Reader happily takes huge image-based LRFs, and has no problem displaying them. I've tried as large as 37MB, and they worked very well. Compared to the PDF viewer, the LRF viewer in the Reader has been debugged the hell out of, I guess.
porkupan is offline   Reply With Quote
Old 11-03-2006, 11:39 AM   #17
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Quote:
Originally Posted by porkupan
BTW, my attempts to decipher the DesignHorisontal.lrf with lrf2lrs were unsuccessful. The scripts unloads with the error message:
Traceback (most recent call last):
File "H:\boroda\HTML2LRF-0.1\bin\lrf2lrs.py", line 1506, in <module>
sys.exit(main(sys.argv[1:]))
File "H:\boroda\HTML2LRF-0.1\bin\lrf2lrs.py", line 1500, in main
out.write(h.toXml());
File "H:\boroda\HTML2LRF-0.1\bin\lrf2lrs.py", line 1480, in toXml
xml += o.toXml(self.objects)
File "H:\boroda\HTML2LRF-0.1\bin\lrf2lrs.py", line 498, in toXml
f = StringIO.StringIO(self.stream)
AttributeError: LRFHeader instance has no attribute 'stream'
Here's an updated version which can decompile it.
Also updated lrs2lrf which sets the specific scramble key (0xFE00) checked by LRFCreator.dll.
Attached Files
File Type: zip lrf2lrs_02.zip (12.3 KB, 762 views)
File Type: zip lrs2lrf_011.zip (178.7 KB, 764 views)
igorsk is offline   Reply With Quote
Advert
Old 11-06-2006, 12:26 PM   #18
FangornUK
Addict
FangornUK has a complete set of Star Wars action figures.FangornUK has a complete set of Star Wars action figures.FangornUK has a complete set of Star Wars action figures.FangornUK has a complete set of Star Wars action figures.
 
FangornUK's Avatar
 
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
igorsk, nice work! Working well for me with the Gutenberg HTML books but some of the later ones (e.g. Etext 19694) crash HTML2LRF .
I've looked at the DesignHorizontal.lrs (decompiled with lrf2lrs) but haven't got a clue what it means. Is there anyway to force page breaks in the LRF from the HTML pages?
FangornUK is offline   Reply With Quote
Old 11-06-2006, 05:58 PM   #19
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Quote:
Originally Posted by FangornUK
Is there anyway to force page breaks in the LRF from the HTML pages?
Best would be to split it into separate HTML files. This way you'll also get a bonus in the form of TOC entries.
igorsk is offline   Reply With Quote
Old 11-08-2006, 11:33 AM   #20
ptully
Junior Member
ptully began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Nov 2006
Device: PRS-500
igorsk - Fantastic script! It's exactly what i've been searching for since i got the ebook. I've been writing perl scripts to scrap online mags/blogs all over the place and use your script to convert them, then do a daily sync to the reader. Seems to be working great. Thanks a bunch!!!

scotty1024 - been die'n to try out your prog, but it's been a while since i've dived into java. It looks like i'm missing some libs (when i executed the program). Do i need to download those 2 libs you mentioned in order to get it to work?
ptully is offline   Reply With Quote
Advert
Old 11-09-2006, 10:37 PM   #21
neilm2
Enthusiast
neilm2 began at the beginning.
 
Posts: 35
Karma: 12
Join Date: Oct 2006
Device: Amazon Kindle, Sony Reader
Quote:
Originally Posted by scotty1024
I call this application BBeBook. It is far from perfect/complete in its understanding of LRF, but It is written 100% in Java and needs no dll's from Sony. It is Unicode clean.

It uses a couple public java libraries: xpp3 and jpedal.

It can re-flow HTML and PDF documents into LRF files. It has latent support for rasterizing PDF files into PNG's in the LRF (non-reflow).

It comes with a sample Creative Commons ebook to bind with it: Cory Doctorow's Someone Comes to Town, Someone Leaves Town.

I've GPL'd the tool (not Cory's book), have fun.
Hi Scotty,

I'm curious to try your BBeBook program but I've got zero Java skills. A friend suggests you might have a batch file that compiles or starts the program. Or perhaps a readme file.

Do you?

Thanks!

-Neil
neilm2 is offline   Reply With Quote
Old 11-10-2006, 10:29 AM   #22
FangornUK
Addict
FangornUK has a complete set of Star Wars action figures.FangornUK has a complete set of Star Wars action figures.FangornUK has a complete set of Star Wars action figures.FangornUK has a complete set of Star Wars action figures.
 
FangornUK's Avatar
 
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
igorsk, I've written some perl wrapper scripts to feed HTML books into your HTML2LRF, mostly for Gutenberg HTML books, the thread is here

Is there anyway to stop HTML2LRF from generating the front title page?

Also when running HTML2LRF you have to be in its directory for it to work otherwise it cannot find the DesignHorizontal.lrf file, noticed some code in the HTML2LRF.cpp to handle this but then later it is ignored and just looks in the current directory.
FangornUK is offline   Reply With Quote
Old 11-10-2006, 11:28 AM   #23
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
As far as I can see, addition of the title page is hardcoded in LBParser.dll. LRFCreator.dll gives more flexibility but you'd have to do a lot of manual work, like parsing the HTML...
And thanks for noticing the bug, I'll fix it.
igorsk is offline   Reply With Quote
Old 11-17-2006, 02:32 PM   #24
diabloNL
Gadget Force®
diabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with others
 
diabloNL's Avatar
 
Posts: 705
Karma: 2733
Join Date: Jun 2006
Location: The Netherlands
Device: Sony PRS-300 + Cybook with funny screen :P
[QUOTE=igorsk]

Usage:
HTML2LRF [-t "Book title"] [-a "Book Author"] [-o output_filename] <url|path.html> [<url|path.html>...]
Defaults are "Test Book", "Unknown Author", and "test.lrf".


Can somebody please tell me how to format the command exactly if I have:

A book ready at: C:\Documents and Settings\Bobby\Desktop\Cell.html

The program is here: C:\Documents and Settings\Bobby\Desktop\HTML2LRF\bin\

Thanks!


I tried to do it but I get a runtime error:
Attached Thumbnails
Click image for larger version

Name:	Image1.jpg
Views:	651
Size:	24.5 KB
ID:	2212  
diabloNL is offline   Reply With Quote
Old 11-17-2006, 06:20 PM   #25
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Something like this should work:
c:
cd "C:\Documents and Settings\Bobby\Desktop\HTML2LRF\bin\"
HTML2LRF "C:\Documents and Settings\Bobby\Desktop\Cell.html"
igorsk is offline   Reply With Quote
Old 11-17-2006, 06:50 PM   #26
diabloNL
Gadget Force®
diabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with others
 
diabloNL's Avatar
 
Posts: 705
Karma: 2733
Join Date: Jun 2006
Location: The Netherlands
Device: Sony PRS-300 + Cybook with funny screen :P
Quote:
Originally Posted by igorsk
Something like this should work:
c:
cd "C:\Documents and Settings\Bobby\Desktop\HTML2LRF\bin\"
HTML2LRF "C:\Documents and Settings\Bobby\Desktop\Cell.html"

Thanks igorsk but I still get the runtime error. Will try it on another laptop tomorrow.
diabloNL is offline   Reply With Quote
Old 11-17-2006, 07:12 PM   #27
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Then I guess it could be something to do with the HTML file... how big is it?
igorsk is offline   Reply With Quote
Old 11-17-2006, 07:17 PM   #28
diabloNL
Gadget Force®
diabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with others
 
diabloNL's Avatar
 
Posts: 705
Karma: 2733
Join Date: Jun 2006
Location: The Netherlands
Device: Sony PRS-300 + Cybook with funny screen :P
It's 0.8Mb. I tried different files all around the same file size.
diabloNL is offline   Reply With Quote
Old 11-18-2006, 06:44 AM   #29
FangornUK
Addict
FangornUK has a complete set of Star Wars action figures.FangornUK has a complete set of Star Wars action figures.FangornUK has a complete set of Star Wars action figures.FangornUK has a complete set of Star Wars action figures.
 
FangornUK's Avatar
 
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
Quote:
Originally Posted by diabloNL
It's 0.8Mb. I tried different files all around the same file size.
That's too big for HTMl2LRF to handle. Use my splitbook.pl here to split it on Chapters.
FangornUK is offline   Reply With Quote
Old 11-18-2006, 06:50 AM   #30
diabloNL
Gadget Force®
diabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with others
 
diabloNL's Avatar
 
Posts: 705
Karma: 2733
Join Date: Jun 2006
Location: The Netherlands
Device: Sony PRS-300 + Cybook with funny screen :P
Thanks FangornUK! I will give it a try.

EDIT: It works! Only thing is that I would like to adjust the margins and textsize but the DesignHorizontal.lrf/lrs doesn't make sense to me what I need to change.

Man, if only Sony would enable pictures in RTF.

Last edited by diabloNL; 11-19-2006 at 07:43 AM.
diabloNL is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML2LRF and inline pictures pepak Calibre 12 02-04-2009 12:12 PM
chaining web2disk to html2lrf beowulf573 Calibre 2 11-19-2008 04:48 PM
Bookdesigner problem vs. html2lrf alophind Sony Reader 7 02-04-2008 12:20 PM
PRS-500 Need help with Html2Lrf (screen attached) alophind Sony Reader Dev Corner 14 02-01-2008 03:56 AM
html2lrf vs rtf2lrf paspas Sony Reader 0 11-18-2007 02:35 PM


All times are GMT -4. The time now is 01:32 PM.


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