X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=Documentation%2Fmknews.perl;h=1936cea72ae9a8b03d2046707375882795755b8c;hb=3fcef58a3d05ad82c089b081d8c31305f1b12317;hp=f053e2bfb9e558541778762a4d6b3b79bd0b633d;hpb=ba212558b86874d197c86e2acd0776b5b095ee5b;p=public-inbox.git
diff --git a/Documentation/mknews.perl b/Documentation/mknews.perl
index f053e2bf..1936cea7 100755
--- a/Documentation/mknews.perl
+++ b/Documentation/mknews.perl
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# Copyright (C) 2019-2020 all contributors
+# Copyright (C) 2019-2021 all contributors
# License: AGPL-3.0+
# Generates NEWS, NEWS.atom, and NEWS.html files using release emails
# this uses unstable internal APIs of public-inbox, and this script
@@ -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;
@@ -118,10 +119,10 @@ sub html_start {
}
sub html_end {
- print $out <