1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/usr/bin/perl -pi
#
# href2gz : Replace HREF tags to point to compressed HTML files
#
# This script runs on all original .html files.
#
#s/((HREF|SRC)=\"[^\"]+)\.htm[l]?/$1.html.gz/gi;
s/((HREF|SRC)=\"[^\"]+)\.htm[l]?/$1.html/gi;
# Keep all index.html uncompressed
s/((HREF|SRC)=\"[^\"]*index\.html)\.gz/$1/gi;
# Keep all frames files uncompressed (else netscape 4.03 freezes on them)
# frm-help.htm frm-home.htm frm-srch.htm frm-toc.htm
s/(frm-(help|home|srch|toc)\.html)\.gz/$1/g;
# Set any search-engine tag we encounter
# -
# This would be the remote server:
#s|\"/cgi-bin/cgiwrap/mh/mh-index(-frames)?\"|\"http://www.ics.uci.edu/cgi-bin/cgiwrap/mh/mh-index$1/usr/doc/mh-book/html\"|;
# This is the local Debian server
#s|\"/cgi-bin/cgiwrap/mh/mh-index(-frames)?\"|\"http://localhost/cgi-bin/mh-book-local-index"|;
s|\"/cgi-bin/cgiwrap/mh/mh-index(-frames)?\"|\"/cgi-bin/mh-book-index$1\"|;
# Change the background colour
# We don't do this in V9910 because it's done in the upstream source now.
#s/<BODY>/<BODY BGCOLOR=\"\#FFFFFF\">/i;
|