If you have a Perl interpreter, you could do something like this:
Code:
#!/usr/bin/perl
$/ = undef;
my $filename = $ARGV[0];
open(INPUT, "<$filename");
my $data = <INPUT>;
close(INPUT);
my @parts = split(/<splitmarker>/, $data);
my $count = 1;
for my $part (@parts) {
open(OUTPUT, ">outfile_$count.html");
print OUTPUT $part;
close(OUTPUT);
$count++;
}
Save it as split.pl, change "<splitmarker>" to match what you're splitting on, change the output filename if you want (currently outfile_1.html, outfile_2.html, .. outfile_n.html), and then run "split.pl mybook.html" or whatever.
You'll want to then go back and add the starting and ending <html> tags, <head> tags, etc. from the first file to each of the other files.