Quote:
Originally Posted by bkilian
Well, I have a vast (Read: in the hundreds) library of Baen E-books, and I like to keep at least one human readable version around at all times.
[SNIP]
So when I found out that html2lrf does a quite passable conversion on the .LIT html, (as long as I remove the useless table of contents html first) without me doing a huge amount of searching through the book to make sure it was doing the right thing, I jumped on the chance, only to be stumped by the fact that there's no way my human readable archive can contain all the information needed to perform the conversion correctly.
I essentially want to be able to automate the conversion of a number of titles in one go, and it's impossible to do with your current command line driven method of specifying metadata. Essentially, if you add a feature at some point that would benefit me, I'd like to be able to reconvert all my books without having to do it all manually.
[SNIP]
|
I also have hundreds of Baen books. And I convert them automatically, using liprs500's command line tools.
What I've done is write a few shell scripts which I then run in a terminal window on my Mac OS X box -- although they should work fine (with small edits) on any Unix-ish system.
The first script takes a single input directory holding one Baen html eBook, and converts it into lrf, placing the output into the specified output directory. This script knows how to find the cover JPG, how to find the _toc file (which is what I use as the master input for the conversion), and also knows my favorite settings.
The second script takes a directory containing N subdirs (each as above) plus a single 'mapping' file. The mapping file holds one line per book specifying the mapping from input-dir to output-dir (this is how I manage storing books in directories by author, rather than by Baen's release date). It invokes the first script for each book.
The final script simply takes a list of directories suitable for input to the second, and does the obvious invocation.
The upshot of all this is that when Kovid releases a new html2lrf that has a feature I care about, it's a single command line to re-convert all my Baen eBooks.
I've been quick-and-dirty with the script building, so my file paths are built in rather than read from a config file (or whatever) and there's minimal error checking. I'm happy to share if anyone is interested.