01-04-2007, 03:30 AM | #46 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Another problem I'm afraid
Code:
java -jar ./BBeBook.jar Test.xml Error parsing metadata: internal error in parseEpilog org.xmlpull.v1.XmlPullParserException: internal error in parseEpilog at org.xmlpull.mxp1.MXParser.parseEpilog(MXParser.java:1655) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1393) at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) at BBeBook.parseConfig(BBeBook.java:729) at BBeBook.makeBookFromXmlConfig(BBeBook.java:665) at BBeBook.makeBook(BBeBook.java:604) at BBeBook.main(BBeBook.java:292) No <Output> in config file. cat Test.xml <File>/home/kovid/documents/ebooks/temp/Test.html</File> <Output>/home/kovid/documents/ebooks/temp/Test.lrf</Output> <Icon>/home/kovid/work/prs-500/libprs500/lrf/cover.jpg</Icon> <Title>Test.html</Title> <Author>Unknown</Author> <Label>Test.html</Label> <BookID>20e4e18dfae3d1b38df3bce24863b74d</BookID> Last edited by kovidgoyal; 01-04-2007 at 03:47 AM. |
01-04-2007, 11:52 AM | #47 | |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Quote:
On the Mac/Windows you can access Test.xml as test.xml. |
|
Advert | |
|
01-04-2007, 12:02 PM | #48 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Thanks, that'll be good. You may want to use the GNU command line conventions.
Code:
-c arg --long-command=arg |
01-04-2007, 02:52 PM | #49 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Are you planning to add support for non GIF thumbnails?
|
01-04-2007, 03:20 PM | #50 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
I've decoded how to do non-GIF thumbnails but found they generally produced the smallest icon so the software resizes and converts most formats to GIF.
If you can't feed it a 1024x768 JPEG and have it convert that into a LRF GIF icon please let me know. |
Advert | |
|
01-04-2007, 03:24 PM | #51 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Hmm if i feed it a JFIF (.jpg) file via the <Icon> directive, it sets the thumbnail_type bytes (2 bytes at 0x4e) to 0x14 (i.e. GIF) but the actual thumbnail data has a JFIF header and is identified as a JPEG by imagemagick.
|
01-04-2007, 03:28 PM | #52 | |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Quote:
|
|
01-04-2007, 03:41 PM | #53 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Thanks for taking the time to address my concerns. I just thought you may not be used to the GNU conventions, since BBeBook seems to have been developed on a non GNU platform. At any rate there's no rush as with the patch to the command line processor, I can easily use the xml interface in my code.
|
01-04-2007, 04:28 PM | #54 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
I've been GNU'ing for 21 years now.
|
01-04-2007, 04:45 PM | #55 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Cool 21 certainly beats my 10...sorry to be such a pest, but here's what seems to be a rather serious bug. The generated LRF file seems to be invalid (Gives an error in the Connect Reader).
Code:
java -jar ../BBeBook-0.2.jar leaves.xml If the original leaves.lrf was generated by BBeBook-0.2, I'm at a loss. |
01-11-2007, 02:25 PM | #56 | |
Addicted
Posts: 22
Karma: 10
Join Date: Nov 2006
Location: Wisconsin
Device: iPad, Nooks, PRS-505, Kindles, lots of old ones
|
Quote:
I've run gutlrf with success (which calls HTML2LRF to produce the lrf file), but when I use GutenMark to convert text to HTML, the resultant file does not come out well with HTML2LRF. I was convinced I was doing something wrong, but I'm no longer sure. I do know that the Gutenmarked files display beautifully in both IE and firefox. I've run tidy, and I've split the html into chapters, and banged my head against the wall... Anyone have any idea of what HTML2LRF is looking for in the html format? I'm thinking there is something missing from both the gutenmark files and the baen files. -e- |
|
01-11-2007, 04:01 PM | #57 |
Addict
Posts: 205
Karma: 317
Join Date: Oct 2006
Location: England
Device: Sony PRS-505, iPad, Kindle 3
|
What sort of problem are you having with GutenMark & HTML2LRF? Works fine for me on Gutenberg text files with HTML2LRF and even handles those difficult formatted plays. Here's what I do to convert them:
Gutenmark.exe file.txt >new.html (Using splitboot.pl in my gutlrf.pl scripts) splitbook.pl -c h1 new.html HTML2LRF can't handle HTML files above 600k in size so you need to use splitbook.pl to split the files. P.S. Just a comment on this thread, can the BBeBook discussions go into a different thread? It seems to have taken over this HTML2LRF thread. Last edited by FangornUK; 02-03-2007 at 06:51 AM. |
01-16-2007, 12:12 AM | #58 |
Junior Member
Posts: 1
Karma: 10
Join Date: Jan 2007
Device: Sony PRS-500
|
Global patch: id needs to be static
java -jar ../BBeBook-0.2.jar leaves.xml
[/code] The generated leaves.lrf is different from the original included in the source tarball. The generated one gives an error in the Connect Reader the original does not. The files are attached. Essentially the difference between the files is that in the generated one the toc object id is 0x32 instead of 0x33 and a whole bunch of bytes that were different values in the original are set to 0x32 in the generated version. If the original leaves.lrf was generated by BBeBook-0.2, I'm at a loss.[/QUOTE] GREAT JOB with the decoding! Minor bug fix to solve 0x32 problem. The 0x32 is the id value that is not being updated/incremented. In BBeBObject.java, line 22; make globalBBeBObject static: private static short globalBBeBObject = 0x32;// Magic.. Ask Sony why all LRF files start here Not sure this is the most efficient solution, since statics usually mean sloppy programming, but it is the easiest short-term solution. Keep up the good work. |
01-16-2007, 12:49 AM | #59 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Thats certainly and efficient short term fix! Thanks, now I can add BBeBook to libprs500. Hopefully scott1024 will fix it properly once he's done refactoring.
|
06-25-2007, 07:01 AM | #60 |
Keen reader
Posts: 4
Karma: -54
Join Date: Jun 2007
Device: kobo touch
|
Scotty1K - could you give a chap a clue how to use this package? I'm running Windows XP - is that OK?
|
|
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 |