| 1 |
wakaba |
1.1 |
|
| 2 |
|
|
$H2H::themepath = '/home/local/h2h/H2H/';
|
| 3 |
|
|
require H2H;
|
| 4 |
|
|
require $H2H::themepath.'default/theme.ph';
|
| 5 |
|
|
|
| 6 |
|
|
($O{y}, $O{m}, $O{path}) = @ARGV;
|
| 7 |
|
|
|
| 8 |
|
|
unless ($O{y}) {
|
| 9 |
|
|
(undef, undef, undef, undef, $O{m}, $O{y}) = localtime; $O{m}++;
|
| 10 |
|
|
$rev = 1;
|
| 11 |
|
|
}
|
| 12 |
|
|
$O{y} += 1900 if $O{y} < 1000;
|
| 13 |
|
|
$O{m} = substr('0'.$O{m}, -2);
|
| 14 |
|
|
$O{path} = $O{path} || '\\home\\local\\d\\'.$O{y}.'\\';
|
| 15 |
|
|
|
| 16 |
|
|
$basepath = $O{path};
|
| 17 |
|
|
$hnffiles = 'd'.$O{y}.$O{m}.'??.hnf';
|
| 18 |
|
|
$output_filename = '\\home\\suika\\public_html\\d\\d'.$O{y}.$O{m}.'.ja.html';
|
| 19 |
|
|
|
| 20 |
|
|
open A, '| dir /B '.$basepath.$hnffiles.' > .filelist.txt'; close A;
|
| 21 |
|
|
open D, '.filelist.txt'; @FILELIST = <D>; close D;
|
| 22 |
|
|
|
| 23 |
|
|
if ($rev) {@FILELIST = sort {$b cmp $a} @FILELIST}
|
| 24 |
|
|
else {@FILELIST = sort {$a cmp $b} @FILELIST}
|
| 25 |
|
|
|
| 26 |
|
|
my $output;
|
| 27 |
|
|
|
| 28 |
|
|
for (@FILELIST) { chop;
|
| 29 |
|
|
my @prefix; if (/(\d{4})(\d\d)(\d\d)/) {@prefix = ($1,$2,$3)}
|
| 30 |
|
|
elsif (/^(.+)\.hnf$/) {$prefix[3] = $1}
|
| 31 |
|
|
open HNF, $basepath.$_;
|
| 32 |
|
|
my @HNF = <HNF>;
|
| 33 |
|
|
$output .= &H2H::h2h(undef, \@prefix, @HNF);
|
| 34 |
|
|
close HNF;
|
| 35 |
|
|
}
|
| 36 |
|
|
|
| 37 |
|
|
if ($output) {
|
| 38 |
|
|
my $title;
|
| 39 |
|
|
if(-e $basepath.'.title'){open T,$basepath.'.title';while(<T>){$title.=$_}close T}
|
| 40 |
|
|
require '/home/rocket/pl/jcode.pl';
|
| 41 |
|
|
my $s = &H2H::Page::start($title).$output.&H2H::Page::end($title);
|
| 42 |
|
|
jcode::convert(\$s, 'jis', 'euc');
|
| 43 |
|
|
open HTML, '> '.$output_filename; binmode HTML;
|
| 44 |
|
|
print HTML $s;
|
| 45 |
|
|
close HTML;
|
| 46 |
|
|
}
|
| 47 |
|
|
|
| 48 |
|
|
1;
|