]> Sergey Matveev's repositories - public-inbox.git/blobdiff - Documentation/mknews.perl
treewide: replace {-inbox} with {ibx} for consistency
[public-inbox.git] / Documentation / mknews.perl
index f053e2bfb9e558541778762a4d6b3b79bd0b633d..d87c260918c9c048544375ebf3c370fb8b6565f3 100755 (executable)
@@ -7,6 +7,7 @@
 use strict;
 use PublicInbox::Eml;
 use PublicInbox::View;
+use PublicInbox::Hval qw(fmt_ts);
 use PublicInbox::MsgTime qw(msg_datestamp);
 use PublicInbox::MID qw(mids mid_escape);
 END { $INC{'Plack/Util.pm'} and warn "$0 should not have loaded Plack::Util\n" }
@@ -42,7 +43,7 @@ if ($dst eq 'NEWS') {
        );
        $ibx->{-primary_address} = $addr;
        my $ctx = {
-               -inbox => $ibx,
+               ibx => $ibx,
                -upfx => "$base_url/",
                -hr => 1,
        };
@@ -91,7 +92,7 @@ sub mime2txt {
        my $title = $mime->header('Subject');
        $title =~ s/^\s*\[\w+\]\s*//g; # [ANNOUNCE] or [ANN]
        my $dtime = msg_datestamp($mime->header_obj);
-       $title .= ' - ' . PublicInbox::View::fmt_ts($dtime) . ' UTC';
+       $title .= ' - ' . fmt_ts($dtime) . ' UTC';
        print $out $title, "\n" or die;
        my $uline = '=' x length($title);
        print $out $uline, "\n\n" or die;
@@ -130,7 +131,7 @@ sub atom_start {
        # WwwAtomStream stats this dir for mtime
        my $astream = PublicInbox::WwwAtomStream->new($ctx);
        delete $astream->{emit_header};
-       my $ibx = $ctx->{-inbox};
+       my $ibx = $ctx->{ibx};
        my $title = PublicInbox::WwwAtomStream::title_tag($ibx->description);
        my $updated = PublicInbox::WwwAtomStream::feed_updated($mtime);
        print $out <<EOF or die;