* [PATCH 1/4] examples/public-inbox.psgi: shorten to simplify
2016-01-04 1:03 [PATCH 0/4] misc updates to push Eric Wong
@ 2016-01-04 1:03 ` Eric Wong
2016-01-04 1:03 ` [PATCH 2/4] www: comments for denoting Plack::Request vs CGI Eric Wong
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2016-01-04 1:03 UTC (permalink / raw)
To: meta
Enable deflater using a shorter string as we do with other
middlewares, and use single quotes to denote we do not need
interpolation.
---
examples/public-inbox.psgi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi
index 4d34b42..9fa51ba 100644
--- a/examples/public-inbox.psgi
+++ b/examples/public-inbox.psgi
@@ -12,13 +12,13 @@ use Plack::Builder;
my $have_deflater = eval { require Plack::Middleware::Deflater; 1 };
builder {
- enable 'Plack::Middleware::Chunked';
+ enable 'Chunked';
if ($have_deflater) {
- enable "Deflater",
+ enable 'Deflater',
content_type => [ 'text/html', 'text/plain',
'application/atom+xml' ];
}
- enable "Head";
+ enable 'Head';
sub {
my $req = Plack::Request->new(@_);
PublicInbox::WWW::run($req, $req->method);
--
EW
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] www: comments for denoting Plack::Request vs CGI
2016-01-04 1:03 [PATCH 0/4] misc updates to push Eric Wong
2016-01-04 1:03 ` [PATCH 1/4] examples/public-inbox.psgi: shorten to simplify Eric Wong
@ 2016-01-04 1:03 ` Eric Wong
2016-01-04 1:03 ` [PATCH 3/4] misc doc updates Eric Wong
2016-01-04 1:03 ` [PATCH 4/4] view: label "relevance" in threaded search view Eric Wong
3 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2016-01-04 1:03 UTC (permalink / raw)
To: meta
We'll probably want to continue supporting CGI for mod_perl
compatibility.
---
lib/PublicInbox/ExtMsg.pm | 2 +-
lib/PublicInbox/Feed.pm | 2 +-
lib/PublicInbox/WWW.pm | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/PublicInbox/ExtMsg.pm b/lib/PublicInbox/ExtMsg.pm
index 59bbae5..a56df33 100644
--- a/lib/PublicInbox/ExtMsg.pm
+++ b/lib/PublicInbox/ExtMsg.pm
@@ -89,7 +89,7 @@ sub ext_msg {
again:
my $cgi = $ctx->{cgi};
my $url = ref($cgi) eq 'CGI' ? $cgi->url(-base) . '/'
- : $cgi->base->as_string;
+ : $cgi->base->as_string; # Plack::Request
$url .= $listname;
unshift @pfx, { git_dir => $ctx->{git_dir}, url => $url };
foreach my $pfx (@pfx) {
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index 5708b60..65514eb 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -287,7 +287,7 @@ sub get_feedopts {
my $base;
if (ref($cgi) eq 'CGI') {
$base = $cgi->url(-base);
- } else {
+ } else { # Plack::Request
$base = $cgi->base->as_string;
$base =~ s!/\z!!;
}
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index b4c050b..411db16 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -198,6 +198,7 @@ sub get_thread {
sub self_url {
my ($cgi) = @_;
+ # Plack::Request
ref($cgi) eq 'CGI' ? $cgi->self_url : $cgi->uri->as_string;
}
@@ -362,7 +363,7 @@ sub r301 {
if (ref($cgi) eq 'CGI') {
$url = $cgi->url(-base) . '/';
$qs = $cgi->query_string;
- } else {
+ } else { # Plack::Request
$url = $cgi->base->as_string;
$qs = $cgi->env->{QUERY_STRING};
}
--
EW
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] misc doc updates
2016-01-04 1:03 [PATCH 0/4] misc updates to push Eric Wong
2016-01-04 1:03 ` [PATCH 1/4] examples/public-inbox.psgi: shorten to simplify Eric Wong
2016-01-04 1:03 ` [PATCH 2/4] www: comments for denoting Plack::Request vs CGI Eric Wong
@ 2016-01-04 1:03 ` Eric Wong
2016-01-04 1:03 ` [PATCH 4/4] view: label "relevance" in threaded search view Eric Wong
3 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2016-01-04 1:03 UTC (permalink / raw)
To: meta
Strongly emphasize decentralization, as that was actually the
main impetus for my interest in git.
---
HACKING | 5 ++++-
README | 3 ++-
TODO | 12 ++++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/HACKING b/HACKING
index 46f8a3e..1cda588 100644
--- a/HACKING
+++ b/HACKING
@@ -6,10 +6,13 @@ It is archived at <http://public-inbox.org/meta/>.
Please consider our goals in mind:
- Accessibility, Compatibility, Performance
+ Decentralization, Accessibility, Compatibility, Performance
These goals apply to everyone: users viewing over the web or NNTP,
sysadmins running public-inbox, and other hackers working public-inbox.
+We will reject any feature which advocates or contributes to a particular
+instance of a public-inbox becoming a single point of failure.
+
See design_www.txt and design_notes.txt in the Documentation/ directory
for design decisions made during development.
diff --git a/README b/README
index 4c405ac..09b66a3 100644
--- a/README
+++ b/README
@@ -66,7 +66,8 @@ Requirements (participant)
* any MUA which may send text-only emails ("git send-email" works!)
Users are strongly encouraged to use the "reply-all" feature of
- their mailers to reduce the impact of a public-inbox as a SPOF.
+ their mailers to reduce the impact of a public-inbox as a
+ single point of failure.
* participants do not need to install public-inbox, only server admins
diff --git a/TODO b/TODO
index 2d70995..d2f57d8 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,17 @@
+TODO items for public-inbox
+
+(Not in any particular order)
+
* implement RFC 4685 (Atom message threading)
* configurable constants (quote folding, index limits)
* use tags as date-based skiplists for navigating history
+ (maybe not needed with Xapian support nowadays?)
+* handle Xapian date range queries:
+ http://mid.gmane.org/20151005222157.GE5880@survex.com
+* use REQUEST_URI properly for CGI / mod_perl2 compatibility
+ with Message-IDs which include '%'
+* more test cases (use git fast-import to speed up creation)
+* large mbox/Maildir/MH/NNTP spool import (use git fast-import)
+* remove dependency on ssoma installation (inline the code)
* improve + document mlmmj integration, currently only at:
http://bogomips.org/unicorn-public/20140508084301.GA2033%40dcvr.yhbt.net/
--
EW
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] view: label "relevance" in threaded search view
2016-01-04 1:03 [PATCH 0/4] misc updates to push Eric Wong
` (2 preceding siblings ...)
2016-01-04 1:03 ` [PATCH 3/4] misc doc updates Eric Wong
@ 2016-01-04 1:03 ` Eric Wong
3 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2016-01-04 1:03 UTC (permalink / raw)
To: meta
The threaded search view is somewhat alien to new users,
so ensure we label the word "relevance" for them.
---
lib/PublicInbox/SearchView.pm | 2 ++
lib/PublicInbox/View.pm | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index 5d4f4fe..b3ddcb5 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -56,6 +56,8 @@ sub sres_top_html {
[$code, ['Content-Type'=>'text/html; charset=UTF-8'], [$res]];
}
+# display non-threaded search results similar to what users expect from
+# regular WWW search engines:
sub dump_mset {
my ($res, $mset) = @_;
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index fac0fcb..4fc8ffc 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -140,8 +140,8 @@ sub index_entry {
}
$rv .= " <a\nhref=\"$parent_anchor\">parent</a>";
}
- if (my $pct = $state->{pct}) {
- $rv .= " [$pct->{$mid_raw}%]";
+ if (my $pct = $state->{pct}) { # used by SearchView.pm
+ $rv .= " [relevance $pct->{$mid_raw}%]";
} elsif ($srch) {
if ($ctx->{flat}) {
$rv .= " [<a\nhref=\"${path}$href/t/#u\">threaded</a>" .
--
EW
^ permalink raw reply related [flat|nested] 5+ messages in thread