Tetsuro KURITA > HTML-SiteTear-1.44 > HTML::SiteTear

Download:
HTML-SiteTear-1.44.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 1.44   Source  

NAME ^

HTML::SiteTear - Make a separated copy of a part of the site

VERSION ^

Version 1.44

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 (e.g. "http://www.....").

To convert links should not be followed into absolute links,

AUTHOR ^

Tetsuro KURITA <tkurita@mac.com>