X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwStream.pm;h=97a6dc78815b1e5e4734a855303c1cf9c00948bf;hb=79bf257cbc4e188992f540d6b4ae1bd5cbcf26ee;hp=34f32c0bdcdb088f056baa12e383622339321c0d;hpb=7a9035643fc19b89699093dfda1eb3f32c4c29a9;p=public-inbox.git diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index 34f32c0b..97a6dc78 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -7,13 +7,19 @@ use strict; use warnings; use PublicInbox::Hval qw(ascii_html); use URI; -use constant PI_URL => 'https://public-inbox.org/README.html'; +use constant PI_URL => 'https://public-inbox.org/public-inbox.git'; sub new { my ($class, $ctx, $cb) = @_; bless { nr => 0, cb => $cb, ctx => $ctx }, $class; } +sub response { + my ($class, $ctx, $code, $cb) = @_; + [ $code, [ 'Content-Type', 'text/html; charset=UTF-8' ], + $class->new($ctx, $cb) ] +} + sub _html_top ($) { my ($self) = @_; my $ctx = $self->{ctx}; @@ -22,10 +28,21 @@ sub _html_top ($) { my $title = $ctx->{-title_html} || $desc; my $upfx = $ctx->{-upfx} || ''; my $atom = $ctx->{-atom} || $upfx.'new.atom'; + my $tip = $ctx->{-html_tip} || ''; my $top = "$desc (Atom feed)"; if ($obj->search) { - $top = qq{
} } else { @@ -35,7 +52,7 @@ sub _html_top ($) { "" . PublicInbox::Hval::STYLE . - "$top"; + "". $top . $tip; } sub _html_end { @@ -69,8 +86,8 @@ sub _html_end { ''.join("\n", '- ' . $desc, $urls, - 'served with software from public-inbox: ' - ."$url", + 'Archived served using code from public-inbox:', + "\tgit clone $url", ).'