![]() |
#751 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Technically, the LRF format does support borders, but html2lrf doesn't translate this. For that kind of advanced formatting, it should be easier to switch to EPUB anyway.
|
![]() |
![]() |
![]() |
#752 | |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Nov 2008
Device: none
|
How to use html2lrf
Quote:
Hi I just want in brief how to use the above given source code in linux. And is there any c++ source code which can convert html files into lrf file format. Regards Krish |
|
![]() |
![]() |
Advert | |
|
![]() |
#753 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2008
Device: PRS505
|
I have spent a fair bit of time playing with the TOC detect features in Calibre and the only thing that seems to work is importing from .prc file which has a TOC already. Importing .LIT does not see the TOC even if the file has one. The auto chapter detect does not work at all in LRF conversion - but I did make it work once converting to EPUB. The conversions were done using test files so I could control the tag name and attribute in the input doc. I have tried HTML, RTF and plain text - no luck with any of them.
|
![]() |
![]() |
![]() |
#754 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
TOC detection doesn't create a toc int the file itself. It creates an external toc. You can access the external toc from the menu on the sony reader.
|
![]() |
![]() |
![]() |
#755 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Nov 2008
Device: none
|
Hi..
Quote:
![]() ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#756 |
Karmaniac
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,553
Karma: 11499146
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
|
feat request concearning downloading feeds and converting them to lrf.
Everytime I download a feed and get it converted to lrf, I get in my newsfeeds the message: "Please turn on JavaScript. Media requires Javascript to play." I wanted to know if it was possible to remove such a line before converting it to lrf. It's only obvious lrf does not support javascript, and neither does the reader's screen. Also since Calibre currently is made to fit the sony Reader, and no other mobile devices, I think it's a good idea to remove this 'javascript' line from the html. So far I haven't seen any CNN newsfeeds with pictures. If a version uses javascript to display a picture, then it'd be nice to get to convert the first picture to a jpg. If it uses javascript to display a movie above the article, then it'd be nice to either see the first frame, or nothing at all(kind of like they use in an article with an integrated youtube video, or just remove the line, since it does not benefit the reader). Removing the sentence should not be that hard (like when the html is retrieved, set a parameter like "javascript = 'Please turn on JavaScript. Media re...etc...' ". then insert some command like "if sentence "javascript" has been found, then delete it." after it's deleted you can convert the remaining html to lrf. I mean I hope you get the general idea... |
![]() |
![]() |
![]() |
#757 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
which feed gives you this message?
|
![]() |
![]() |
![]() |
#758 |
Karmaniac
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,553
Karma: 11499146
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
|
I'm sorry, not CNN, but BBC news has the lines.
I don't know if it's happening to someone else too, but occasionally I get a reader reboot when opening one rss feed after another (eg like I did now, opening Daily Telegraph after BBC. It reboots when formatting the book. I don't know if it has anything to do with badly downloaded books, since I'm on a wifi connection and occasionally this connection has hiccups. |
![]() |
![]() |
![]() |
#759 |
Enthusiast
![]() Posts: 31
Karma: 60
Join Date: Mar 2007
Device: Sony Reader
|
Just noticed that epub2lrf is ignoring the epub's page breaks and reprocessing the html for breaks.
I had used CSS in the original html to give 'H[1234]' tags a 'page-break-before: always' style. This made a nice epub appropriately split at each header, but when I used epub2lrf on that epub the resulting lrf only had page breaks on the headers that contained the magic word "book". I can force epub2lrf to split at all headers with the --force-page-break-before-tag="h[1234]" option, but I'm thinking epub2lrf should take it's splitting cues from the epub layout. I have also used <br style="page-break-before: always;" /> tags in the original html to force page breaks in some unheadered spots. These work fine for producing the desired break in the epub, but the break is lost when converting that epub to lrf. Same issue really. I can still use the original htmls to produce lrfs with the correct page-breaks, but I was hoping to ditch the original htmls and just keep the epubs around as my final source....that's the plan anyway. Maybe epub2lrf could have a flag that ignores all chapter detection and just splits where the epub splits? Cheers, Lee |
![]() |
![]() |
![]() |
#760 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The problem isn't that html2lrf is ignoring the page breaks, it's that it cant parse advanced css selectors. So if you used
h1 {page-break...} h2 {page-break...} h3 {page-break...} etc it would still work |
![]() |
![]() |
![]() |
#761 |
Enthusiast
![]() Posts: 31
Karma: 60
Join Date: Mar 2007
Device: Sony Reader
|
I think I worded it wrong.
My html files css had: h1, h2, h3, h4 { page-break-before: always; } From that html I can create an lrf and an epub with correct page-breaks. But, if I run epub2lrf on that epub, which itself has correct page-breaks, the resulting lrf will have incorrect page-breaks (only breaks when it finds the "chapter detection words" in the headers). I'll attach example files. The lrf was generated from the epub. The epub breaks at each chapter, but the lrf only breaks on chapter headers that contain "book". Cather, Willa - One Of Ours.epub Cather, Willa - One Of Ours.lrf |
![]() |
![]() |
![]() |
#762 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Looks like a bug, opena ticket and attach the files so I dont forget to address it
|
![]() |
![]() |
![]() |
#763 | |
Enthusiast
![]() Posts: 31
Karma: 60
Join Date: Mar 2007
Device: Sony Reader
|
Quote:
I didn't disable automatic chapter detection. There were headers that had the keyword "book" in them so auto chapter detection was triggered and non-keyword headers were treated as non-chapters. Makes perfect sense. I've got it working fine now. Cheers. |
|
![]() |
![]() |
![]() |
#764 |
Enthusiast
![]() Posts: 31
Karma: 60
Join Date: Mar 2007
Device: Sony Reader
|
Scratch that, doesn't work.
Filed a ticket with html, epub, and lrf files that show the problem. Looks like the class="chapter", and style="page-break-before: always;" tag attributes are being honored when creating the epub, but are stripped from the epub's html. Thus, when I go to make the lrf from the epub I don't get the page-breaks. |
![]() |
![]() |
![]() |
#765 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Nov 2008
Device: none
|
is there any the best possible way to convert pdf into mobipocket files (.prc)...exact as same as the pdf...
![]() |
![]() |
![]() |
![]() |
Tags |
html2lrf, libprs500 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change font of header for LRF Output on PRS 505 | duckbill | Calibre | 3 | 05-15-2010 11:07 AM |
Pissed off with LRF formatting: LRF/LRS clean tool? | grimborg | LRF | 8 | 02-15-2010 01:14 PM |
Fonts for LRF output | krischik | Calibre | 1 | 10-03-2009 05:01 AM |
CBZ > LRF (LRF>HTML/MOBI????) | sideburnt | Calibre | 4 | 09-15-2009 06:44 AM |
libprs500 Issues Converting .LIT to .LRF - .LRF crashes everything | vasbinde | Calibre | 6 | 02-14-2008 12:16 PM |