use Email::MIME;
use Date::Parse qw(strptime);
use PublicInbox::Hval qw/ascii_html/;
-use PublicInbox::Git;
use PublicInbox::View;
use PublicInbox::MID qw/mid_clean mid2path/;
use PublicInbox::Address;
}
$ctx->{-html_tip} = '<pre>';
$ctx->{-upfx} = '';
+ $ctx->{-hr} = 1;
PublicInbox::WwwStream->response($ctx, 200, sub {
while (my $path = shift @paths) {
my $m = do_cat_mail($ctx->{-inbox}, $path) or next;
my $more = scalar @paths;
my $s = PublicInbox::View::index_entry($m, $ctx, $more);
- $s .= '</pre>' unless $more;
return $s;
}
new_html_footer($ctx, $last);
end_feed($fh);
}
-sub _html_index_top {
- my ($feed_opts, $srch) = @_;
-
- my $title = ascii_html($feed_opts->{description} || '');
- my $top = "<b>$title</b> (<a\nhref=\"new.atom\">Atom feed</a>)";
- if ($srch) {
- $top = qq{<form\naction=""><pre>$top} .
- qq{ <input\nname=q\ntype=text />} .
- qq{<input\ntype=submit\nvalue=search />} .
- q{</pre></form><pre>}
- } else {
- $top = '<pre>' . $top . "\n";
- }
-
- "<html><head><title>$title</title>" .
- "<link\nrel=alternate\ntitle=\"Atom feed\"\n".
- "href=\"new.atom\"\ntype=\"application/atom+xml\"/>" .
- PublicInbox::Hval::STYLE .
- "</head><body>$top";
-}
-
sub new_html_footer {
my ($ctx, $last) = @_;
my $qp = delete $ctx->{qp} or return;
# private functions below
sub get_feedopts {
my ($ctx) = @_;
- my $pi_config = $ctx->{pi_config};
my $inbox = $ctx->{inbox};
my $obj = $ctx->{-inbox};
my %rv = ( description => $obj->description );