This utility will recurse through a specified directory, parse all the .htm and .html files, and replace any absolute URL's with relative URL's to a base you define.
You can also specify what types of links to parse: img, src, action, or any others. Please see HTML::Tagset's
%linkElements hash, in the module's source, for a precise breakdown of supported tag-types.
This program was good practice for trying out Getopt::Declare, an excellent command-line parser. Please note the parameter specification below the __DATA__ tag.
Disclaimer: Always use the -b switch to force backups, just in case you have non-standard HTML and the HTML::TreeBuilder parser mangles it.
Comments and suggestions for improvement are always welcome and very much appreciated. |