View Single Post
Old 10-16-2011, 11:43 AM   #43
MrWarper
Zealot
MrWarper knows what time it isMrWarper knows what time it isMrWarper knows what time it isMrWarper knows what time it isMrWarper knows what time it isMrWarper knows what time it isMrWarper knows what time it isMrWarper knows what time it isMrWarper knows what time it isMrWarper knows what time it isMrWarper knows what time it is
 
Posts: 133
Karma: 2142
Join Date: Oct 2011
Location: Spain
Device: I'm an iRex man: 8x DR1000S, 4x DR800SG, 4x DR800S
I've just run into the same problem and I've coded a simple command line HTML concatenator, so you simply issue

HTMLCat book.htm part1.htm part2.htm part3.htm ...

at a command prompt and it merges part1, part2, part3, etc. in the specified order into book.htm.
Alternatively, if all your filenames are in alphabetical order you can simplify and do things like

HTMLCat book.htm cover.htm chapter*.htm

The thing is still a bit crude (it simply keeps the HTML <head> of the first file and concatenates all of the <body> contents of every file after that, so all files must use the same encoding, no ID attributes are checked for duplicity, etc.) but otherwise fully functional.

Anyone interested? It's writen in REXX, so it can be run on Windows, Linux and pretty much everything else right away with Regina REXX
MrWarper is offline   Reply With Quote