So, I set myself to figure out how to convert stuff for myself. After a few dead ends, I discovered txt2pdbdoc by Paul Jay Lucas. It's a Unix utility, which, as the name suggests, converts a txt file to a doc file.
I've gotten this down to a science, and am churning out 2 or 3 of these a day, mostly while I'm waiting on hold, or other wasted time.
Here's the procedure:
BookTitle00.txt
, BookTitle01.txt
, BookTitle02.txt
, and so on. This is the most time-consuming step.txt2pdbdoc
installed. If you created the files on a Windows machine, make sure that you transfer them in ascii mode!perl -e 'for(0..4){$_=sprintf"%.2d",$_;`txt2pdbdoc "Book Title $_" BookTitle$_.txt BookTitle$_.pdb`;}'Of course, replace 4 with the maximum file number that you have, "Book Title" with the title that you want to appear on each file, and BookTitle with the name that you gave to the files in step 2.
Now, after typing that command line a dozen times or so, it gets a little tedious, so you can just use the following Perl program:
#!/usr/bin/perl $max = $ARGV[0]; $title = $ARGV[1]; $filename = $ARGV[2]; &usage unless $filename; for $x (0..$max) { $x = sprintf "%.2d", $x; `txt2pdbdoc \"$title $x\" $filename$x.txt $filename$x.pdb`; } sub usage { print "Usage: pdb_batch no_of_files \"Title\" filename_prefix\n\n"; exit(0); }Call it
pdb_batch
and throw it in /usr/local/bin or somewhere else in your path. You can then call it as shown in the example below:
pdb_batch 4 "Book Title" BookTitle
Hard Times Charles Dickens HardTimes00.pdb - Project Gutenberg information This first file *must* be included in any redistribution of these files! HardTimes01.pdb - Chapters 01-05 HardTimes02.pdb - Chapters 06-10 etc ...