user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 1/3] www_stream: extra link to mirroring information in the footer
  2021-08-30 23:44  5% ` [PATCH 0/3] www: more footer and mirroring instructions tweaks Eric Wong
@ 2021-08-30 23:44  7%   ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-08-30 23:44 UTC (permalink / raw)
  To: meta; +Cc: Konstantin Ryabitsev

This may be redundant with the "mirror" link at the top right,
but maybe people will miss one.  Properly capitalize the
"Code repositories" text while we're at it.

Link: https://public-inbox.org/20210828175827.rgzwqbn7brl56oej@nitro.local/
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
---
 lib/PublicInbox/WwwStream.pm | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index 472316c2..a88ff972 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -89,7 +89,7 @@ sub coderepos ($) {
 	my @ret;
 	for my $cr_name (@$cr) {
 		$ret[0] //= <<EOF;
-<a id=code>code repositories for project(s) associated with this inbox:
+<a id=code>Code repositories for project(s) associated with this inbox:
 EOF
 		my $urls = $cfg->get_all("coderepo.$cr_name.cgiturl");
 		if ($urls) {
@@ -109,10 +109,24 @@ EOF
 
 sub _html_end {
 	my ($ctx) = @_;
-	my @cr = coderepos($ctx);
-	scalar(@cr) ?
-		'<hr><pre>'.join("\n\n", @cr).'</pre></body></html>' :
-		'</body></html>';
+	my $upfx = $ctx->{-upfx} || '';
+	my $m = "${upfx}_/text/mirror/";
+	my $x;
+	if ($ctx->{ibx}->can('cloneurl')) {
+		$x = <<EOF;
+This is a public inbox, see <a
+href="$m">mirroring instructions</a>
+on how to clone and mirror all data and code used for this inbox
+EOF
+	} else {
+		$x = <<EOF;
+This is an external index of several public inboxes,
+see <a href="$m">mirroring instructions</a> on how to clone and mirror
+all data and code used by this external index.
+EOF
+	}
+	chomp $x;
+	'<hr><pre>'.join("\n\n", coderepos($ctx), $x).'</pre></body></html>'
 }
 
 # callback for HTTP.pm (and any other PSGI servers)

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/3] www: more footer and mirroring instructions tweaks
  @ 2021-08-30 23:44  5% ` Eric Wong
  2021-08-30 23:44  7%   ` [PATCH 1/3] www_stream: extra link to mirroring information in the footer Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-08-30 23:44 UTC (permalink / raw)
  To: meta; +Cc: Konstantin Ryabitsev

Some of the wording may still need tweaking, I'm preferring to
favor the data aspect over the code aspect of mirroring since
AGPL probably scares some people.

Not really sure about 3/3 or if including instructions to
grokmirror is out-of-scope for this project.

Eric Wong (3):
  www_stream: extra link to mirroring information in the footer
  www_text/mirror: spell out "external index" and "public inbox"
  www_listing: add note about mirroring information

 lib/PublicInbox/WwwListing.pm |  5 ++++-
 lib/PublicInbox/WwwStream.pm  | 24 +++++++++++++++++++-----
 lib/PublicInbox/WwwText.pm    | 15 ++++++++++-----
 3 files changed, 33 insertions(+), 11 deletions(-)

^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-08-28 17:58     [PATCH 0/2] www: split out mirror to /text/ Konstantin Ryabitsev
2021-08-30 23:44  5% ` [PATCH 0/3] www: more footer and mirroring instructions tweaks Eric Wong
2021-08-30 23:44  7%   ` [PATCH 1/3] www_stream: extra link to mirroring information in the footer Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).