Shiny New E-Book Gizmo: The Amazon Kindle


View Full Version : Developer needs help getting started


cmumford
12-21-2006, 09:29 AM
Hello:

I'm a new Sony Reader owner - and a very happy one. Like the rest of you I've experimented with the best way to get my own content onto the device. RTF seems to give me the best results, but I'd really like to be able to produce documents that are of the same quality as those that I buy on the CONNECT store - and I believe that this means BBeB/LRF.

I've looked at all of the tools linked to in the "BBeB (LRF) generation tools (http://www.mobileread.com/forums/showthread.php?t=8380)" thread. I've had the most success with BBeBook and BookDesigner but neither of them have the usability nor produce the quality of books that I would eventually like to read.

I decided to write my own program to do this. Partly for the fun of doing it, and partly for the benefits of the tool. I started with the BBeBook source (Java), and ported it all to .Net. I've started a new Google open source project named BBeBinder (http://code.google.com/p/bbebinder/), and I will put the source here fairly soon. Unfortunately it looks like the LRF format is not documented, and is also only partially reverse engineered. I came across the LibrieWiki (http://www.sven.de/librie/Librie/BBeB) that had some information on the format, but it's obviously incomplete.

So my questions are:


Is there a better LRF reference out there?
Is there a better LRF creation tool that I've not seen referenced anywhere on this forum? I don't want to reinvent the wheel here.
Has anybody petitioned directly to Sony to release the LRF format?
I can do italic text, but not bold, bolditalic, or any other styles. Has anybody figured this out?


Any guidance you guys can offer a new developer would be greatly appreciated.

Nightwing
12-21-2006, 10:16 AM
Same here... Have seen other reference but they are all off this same set of info. Or at least the one I have found.

Working on something to breaking out the "blocks" but its on the shelf due to this is the busy time of the year for me.

Good luck on your quest. ^_^

Laurens
12-21-2006, 10:20 AM
See this thread (http://www.mobileread.com/forums/showthread.php?t=8795&highlight=bbeb).

cmumford
12-21-2006, 11:05 AM
See this thread (http://www.mobileread.com/forums/showthread.php?t=8795&highlight=bbeb).
Thanks. So do you recommend that my tool create intermediate LRS files (and then pass them through the Book Creator DLL - assuming I can find it), or do you recommend writing directly to LRF?

Laurens
12-21-2006, 11:16 AM
Thanks. So do you recommend that my tool create intermediate LRS files (and then pass them through the Book Creator DLL - assuming I can find it), or do you recommend writing directly to LRF?

The Xylog Parser DLL is not officially available yet. I think the mapping from LRS to LRF is fairly straightforward, though. There's the lrs2lrs Python script that you can use as a reference. One big advantage of generating LRFs directly, is that you can support platforms other than Windows.

quantumskie
12-21-2006, 11:54 AM
Thanks. So do you recommend that my tool create intermediate LRS files (and then pass them through the Book Creator DLL - assuming I can find it), or do you recommend writing directly to LRF?

You can still find the book creator program here (http://librie.2ya.com/). That's where I got my copy. The learning curve to use the problem however is rather steep at first as the program is totally not inutiative and you'll probably have some problems compiling the first book. But I have found by compiling really simple books and setting one feature at a time, it provides a fair bit of insight into how the tags work in a LRF.

I have since stopped exploring the lrf file directly though since I have found it to be far easier to simply use the XylogParser.dll to convert the LRS file. There are some hipcups I encountered while using the Parser to compile though and one of the more irritating ones is that it does not understand some of the named entities used in HTML for certain symbols. Error have been quite hard to find since the parser just simply refuses to compile the file.

kovidgoyal
12-21-2006, 12:11 PM
I don't have much information to give you, only a request. Consider coding in python. I dont have anything against .Net. I ask because I'm writing a GUI in python and have already reverse engineered the USB protocol the reader uses also in python. Eventually, once the GUI's basic functions stabilize, I will be looking at porting makelrf/BBeBook to python. It would be nice if your codebase was easily integrable into the GUI codebase.

I already have a python class that reads/writes all the metadata from an LRF file, that may be a good place to start.

cmumford
12-21-2006, 12:31 PM
Thanks for the pointers. I went and downloaded the files, and also noticed the *.lrs files there, which I've been looking for - there were two. I tried to convert these using the lrs2lrf program, and the log file contained "Can not create LRF Header" - and also some Japanese.

Is this the problem that you are seeing? I would have thought that the pages this guy posted on his site would have been properly formatted and parsable by XylogParser.dll so I'm thinking that maybe I'm doing something wrong.

cmumford
12-21-2006, 05:03 PM
I don't have much information to give you, only a request. Consider coding in python. I dont have anything against .Net. I ask because I'm writing a GUI in python and have already reverse engineered the USB protocol the reader uses also in python. Eventually, once the GUI's basic functions stabilize, I will be looking at porting makelrf/BBeBook to python. It would be nice if your codebase was easily integrable into the GUI codebase.

I already have a python class that reads/writes all the metadata from an LRF file, that may be a good place to start.

I've done a little Python, but not much, and am much better versed in C#, C++, or Perl. I'm already creating full-up BBeB's with the header as well as the data (thanks to BBeBook), but it looks like the authors of makelrf and BBeBook never fully figured out the format. So it looks like I'm stuck using XylogParser.dll and creating intermediate LRS files.

.Net is just a better choice for me because it has fantastic support for XML and schemas. Eventually I want to create a web service to do this, which is also easy in .Net.

It should be call-able from Python, and with Mono should also run on Linux/Mac, but I doubt that XylogParser.dll will run there.

kovidgoyal
12-21-2006, 05:13 PM
OK...so you aren't reverse-engg the LRF format? Just using lrs2lrf?

igorsk
12-21-2006, 05:14 PM
Check lrf2lrs for more details on the real structure of LRF. Or LRFParser (though that one cannot handle some files...).

cmumford
12-21-2006, 06:27 PM
OK...so you aren't reverse-engg the LRF format? Just using lrs2lrf?
Well I'd love to be able to create the LRF's using all native code without having to call out to a separate DLL, but I'm really not up to reverse engineering that format. That's a whole lot of work and time and I'm mostly just looking for a solution.

I'm using what lrs2lrf uses: XylogParser.dll.

SeNS
12-22-2006, 01:28 AM
That's a whole lot of work and time and I'm mostly just looking for a solution.

It takes around a week or little bit more ;-) Search http://www.the-ebook.org/forum (or here) for LRFParser announcement.

P.S. Probably it's good motivation for start learn Russian ;-)