LINREB 0.1

This a quick and dirty program that I threw together to act as the online
librarian for the REB1200. 


COPYRIGHT (or) Lack thereof

You can use it freely, modify it, do whatever
you want with it, as long as you don't claim that you wrote it from
scratch. In the unlikely event that you find this code useful and want to
use it in your products, put an attribution in your code like
"Portions of the code derived from Nandagopal Kirubandan's work. (linreb)."
Of course, I don't take any responsibility for any damage this may cause
to your REB1200, your computer or to anything else. This code is
provided "AS IS", without any warranty, implied or otherwise.


HOWTO

Here is what you do to get it to work.

1) Compile this program
   make

2) Put all your books  (the ".imp" files) in the "shelf/" directory.
   You can also chose to customise the html pages that will be served when
you ask for the bookstore and for the content pages.

3) Run the program (e.g)

   ./linreb -p 9090 -v

   It should print a message telling you how many books it loaded into your
online bookshelf.

4) On the REB1200, make sure that in the network settings, you enable
the HTTP proxy. Set the IP address to the IP of your linux box, and the
port number is the one that you supplied with the "-p" option. 



OPTIONS

-p <port>
   The port number to listen on. This is the port number you should also
set in the REB1200's HTTP proxy port field.

-v
   Verbose. Repeat to get a lot more debugging information.

-l logfile
   Dumps the contents of all transactions between the REB1200 and linreb.
Useful to see why the requests are failing. (Linreb handles only a limited
set of requests made by the REB1200).


BUGS

This is probably the ugliest program I have written. The only good thing
I can say is that it took me only 6 hours to write it :-)  Seriously,
the problem is that linreb does not handle all the types of requests
that may be made by the REB1200. I have found that most of the common
tasks can be done, but if you find something that doesn't work, drop
me a line (with the logfile of the transaction) at nandu at cox dot
net and I will see what I can do.

For some unknown reason, my REB1200 locks up while trying to access the
bookstore. I have to do the "close it for 60 seconds" routine to reset
it. It is odd, because, it doesn't even succeed in making the request
to the linreb server. I think it has something to do with my ethernet
switch, but there is a chance that the linreb is responsible.


NOTE - Free form content

You can serve html pages and jpg images.  The URL 
"http://bookshelf.softbook.net/content" is remapped to the content/ 
directory. Place a link to it from the store/index.html page. (It has already
been done in the example), and then you will be able to access free-form
content by choosing either the "directory" or the "bookshelf" menu
options from the REB1200.

