NAME
HTML::SiteTear - Make a separated copy of a part of the site
VERSION
Version 1.40
SYMPOSIS
use HTML::SiteTear;
$p = HTML::SiteTear->new("/dev1/website/index.html");
$p->copy_to("/dev1/website2/newindex.html");
DESCRIPTION
This module is to make a separated copy of a part of web site in local file system. All linked files (HTML file, image file, javascript, cascading style shieet) from a source HTML file will be copied under a new page.
This module is useful to make a destributable copy of a part of a web site.
METHODS
new
$p = HTML::SiteTear->new($source_path);
$p = HTML::SiteTear->new('source_path' => $source_path,
'site_root_path' => $root_path,
'site_root_url' => $url);
$p = HTML::SiteTear->new('source_path' => $source_dir,
'member_files' => \@pathes);
Make an instance of this module. The path to source HTML file "$source_path" is required as an arguemnt. See "ABSOLUTE LINK" about 'site_root_path' and 'site_root_url' parameters
copy_to
$p->copy_to($destination_path);
Copy $source_path into $destination_path. All linked file in $source_path will be copied into directories under $destination_path
ABSOLUTE LINK
The default behavior of HTML::SiteTear follows all of links in HTML files. In some case, there are links should not be followd. For example, if theare is a link to the top page of the site, all of files in the site will be copyied. Such links should be converted to absolute links (ex. "http://www.....").
To convert links should not be followed into absolute links,
Give parameters of 'site_root_path' and 'site_root_url' to "new" method.
To indicate links should be conveted to absolute links, enclose links in HTML files with specail comment tags <!-- begin abs_link --> and <!-- end abs_link -->
AUTHOR
Tetsuro KURITA <tkurita@mac.com>