Archive::Chm 0.06 review
DownloadArchive::Chm is a Perl module that performs some read-only operations on HTML help (.chm) files
|
|
Archive::Chm is a Perl module that performs some read-only operations on HTML help (.chm) files. Range of operations includes enumerating contents, extracting contents and getting information about one certain part of the archive.
The module supersedes Text::Chm written by Domenico Delle Side. The method get_filelist() and all it's dependencies are taken nearly "as-is" from Text::Chm as written by Domenico.
SYNOPSIS
my $test = Archive::Chm->new("TestPrj.chm");
#make the module log it's activity
$test->set_verbose(1);
$test->set_logfile("chmfile.log");
#set the auto-overwrite function to off
$test->set_overwrite(0);
#enumerate the contents of the archive
$test->enum_files("listing.txt", 1);
#extract all items in a certain directory
$test->extract_all("./out");
#extract a single item from the archive
$item = $test->("/Secret of Monkey Island Solution.html";
#or just get the length of the item
$test->get_item_length("/Secret of Monkey Island Solution.html");
#get complete information about the chm archive
@content = $test->get_filelist();
foreach (@content) {
print $_->{title} . "n" if defined $_->{title};
print $_->{path} . "n";
print $_->{size} . "n";
}
#p.s. There are ways to check for errors, just look up each method and see. :)
Archive::Chm is a module that provides access to Microsoft Compiled HTML Help files (chm files). A lot of today's software ships with documentation in .chm format. However Microsoft only provides viewing tools for their own OS and the company doesn't disclose the format specification.
Unofficial specs can be found at Matthew T. Russotto's site: http://www.speakeasy.org/~russotto/chm/chmformat.html
The module is basically a wrapper of Jed Wing's chmlib, a C library that provides access to all ITSS archives, though .chm is the only ITSS type file in use today. To use this module you need chmlib installed on your system. You can get it at: http://66.93.236.84/~jedwin/projects/chmlib/
Currently access to .chm files is read-only and this will change over time if Jed Wing upgrades his library. Supported operations are getting a listing of the contents, extracting one or all items in the archive and retrieving an item's length.
Requirements:
Perl
Archive::Chm 0.06 search tags