Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] batch text editting


Daniel Freedman wrote:
> Thanks for the suggestion (and thanks also to Jeff's earlier one) but I'm
...
> files I'm changing.  I have this heirarchy of maybe thirty or forty
> related HTML files (all hand-written of course, so no extra crap from a
> windows page formatter like dreamweaver, and therefore, presumably, easier
> to batch edit on), where I'm changing all kinds of things throughout the
> place in the primary root one (indentations, capitalizations, rewriting
> parts, etc.). I would like all of these changes (of the standardized parts
> of all the HTML files, 
....
> like the navigation panels, etc.) to be propogated
> to all other HTML files, but at the same time I don't want the embedded
> content, title, headers, etc. to be changed (which was why a simply 'diff
> -c', 'patch' wouldn't work out-of-the-box).  

This suggestion isn't a solution to your problem here but a
suggestion that might help you avoid getting into this
situation in the future if I understand your problem
correctly.
Seems like you need to be generating your HTML files from
templates using some scripting - either Mason, Perl etc.

For instance, my old Home Pages used to have a table at the
top for navigation rather than use frames. The table was the
same for all pages as it was created by a Perl script. The
body of the text that had to vary was in files with
extension .txt and these were read in by the perl script,
the nav panels added and the tail and HTML spat out.

If you want to I can email privately to you the perl script
and my old pages as an example (60k total).

Mike
-- 
--------------------------------------------------------------------
Michael Lake
University of Technology, Sydney
Email: mailto:Mike.Lake@xxxxxxxxxx Ph: 02 9514 1724 Fx: 02
9514 1628 
URL: http://www.science.uts.edu.au/~michael-lake/
Linux enthusiast, active caver and interested in anything
technical.
--------------------------------------------------------------------