summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command/HTMLify.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-10-03 22:10:15 +0000
committerfukachan <fukachan>2002-10-03 22:10:15 +0000
commitfb01d4f6c58a858dbe216807ae75d56879d180fc (patch)
tree04c02b2ea26a911004e208879088d86f4b2a5af8 /fml/lib/FML/Command/HTMLify.pm
parentcb56579155d67036a91c0da99b57fe32f5d2a431 (diff)
downloadfml8-fb01d4f6c58a858dbe216807ae75d56879d180fc.tar.gz
fml8-fb01d4f6c58a858dbe216807ae75d56879d180fc.tar.bz2
fml8-fb01d4f6c58a858dbe216807ae75d56879d180fc.zip
enabled to handle order in index.html by $html_archive_index_order_type.
Mail::Message::ToHTML o htmlify_{file,dir}() is changted to normal methods for passing arguments.
Diffstat (limited to 'fml/lib/FML/Command/HTMLify.pm')
-rw-r--r--fml/lib/FML/Command/HTMLify.pm21
1 files changed, 14 insertions, 7 deletions
diff --git a/fml/lib/FML/Command/HTMLify.pm b/fml/lib/FML/Command/HTMLify.pm
index 9668c50e..725a0f43 100644
--- a/fml/lib/FML/Command/HTMLify.pm
+++ b/fml/lib/FML/Command/HTMLify.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: HTMLify.pm,v 1.9 2002/09/15 00:11:42 fukachan Exp $
+# $FML: HTMLify.pm,v 1.10 2002/09/22 14:56:43 fukachan Exp $
#
package FML::Command::HTMLify;
@@ -37,8 +37,10 @@ and file in C<$ml_home_dir>.
sub convert
{
my ($curproc, $args, $optargs) = @_;
+ my $config = $curproc->config();
my $src_dir = $optargs->{ src_dir };
my $dst_dir = $optargs->{ dst_dir };
+ my $charset = 'euc-jp';
croak("src_dir not defined") unless defined $src_dir;
croak("src_dir not exists") unless -d $src_dir;
@@ -50,6 +52,13 @@ sub convert
# croak("invalid ML");
# }
+ my $index_order = $config->{ html_archive_index_order_type };
+ my $htmlifier_args = {
+ directory => $dst_dir,
+ charset => $charset,
+ index_order => $index_order,
+ };
+
my ($is_subdir_exists, $subdirs) = _check_subdir_exists($src_dir);
if ($is_subdir_exists) { Log("looks subdir exists");}
@@ -64,9 +73,8 @@ sub convert
for my $xdir (sort _sort_subdirs @$subdirs) {
eval q{
use Mail::Message::ToHTML;
- &Mail::Message::ToHTML::htmlify_dir($xdir, {
- directory => $dst_dir,
- });
+ my $obj = new Mail::Message::ToHTML $htmlifier_args;
+ $obj->htmlify_dir($xdir, $htmlifier_args);
};
croak($@) if $@;
}
@@ -74,9 +82,8 @@ sub convert
else {
eval q{
use Mail::Message::ToHTML;
- &Mail::Message::ToHTML::htmlify_dir($src_dir, {
- directory => $dst_dir,
- });
+ my $obj = new Mail::Message::ToHTML $htmlifier_args;
+ &Mail::Message::ToHTML::htmlify_dir($src_dir, $htmlifier_args);
};
croak($@) if $@;
}