]> www.wagner.pp.ru Git - sites/home_page.git/blobdiff - scripts/make_html.pl
Добавлена книга про русалок в список
[sites/home_page.git] / scripts / make_html.pl
index c0251f5d022f446a3abd4243640e89b26272b128..ce8e438bbc5f6c468cdd733c73ff205b135d2c59 100644 (file)
@@ -7,6 +7,7 @@ use locale;
 use POSIX qw(strftime);
 use Date::Parse;
 use Carp;
+use utf8;
 GetOptions(
        "template=s" => \my $template_file,
        "dest=s" => \my $destdir,
@@ -57,6 +58,8 @@ for my $text_file (@ARGV) {
        $tpl[0] =~ s#(</title>)#$title$1$after_title#is;
        $tpl[0] =~ s#(<body\b)#$1$body_attrs#is if $body_attrs;
        my $top = File::Spec::Unix->abs2rel('', $textdir);
+       print "top=$top\n";
+       $top = "" if ($top eq '/');
        $top .= "/" if length($top);
        my $result = join('', $tpl[0], $body, $tpl[1]);
        $result =~