user/dev discussion of public-inbox itself
 help / color / mirror / Atom feed
From: Eric Wong <>
Subject: [PATCH 3/3] wwwtext: config comment improvements
Date: Wed,  9 Sep 2020 21:23:26 +0000
Message-ID: <> (raw)
In-Reply-To: <>

Use the full URL of the inbox being mirrored to reduce ambiguity
(instead of just the inbox name).

Using asymmetric quotes (e.g `foo') improves readability for me
in that it's more obvious when a quote begins and ends.  It also
lights up fewer pixels and reduces visual noise compared to

We'll also reflow the `mainrepo' vs `inboxdir' comment slightly
to emphasize the word `instead'.
 lib/PublicInbox/ | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/PublicInbox/ b/lib/PublicInbox/
index 99aec370..04c9b1c4 100644
--- a/lib/PublicInbox/
+++ b/lib/PublicInbox/
@@ -139,14 +139,16 @@ sub inbox_config ($$$) {
 	push @$hdr, 'Content-Disposition', 'inline; filename=inbox.config';
 	my $name = dq_escape($ibx->{name});
 	my $inboxdir = '/path/to/top-level-inbox';
+	my $base_url = $ibx->base_url($ctx->{env});
 	$$txt .= <<EOS;
-; example public-inbox config snippet for "$name"
-; see public-inbox-config(5) manpage for more details:
+; Example public-inbox config snippet for a mirror of
+; $base_url
+; See public-inbox-config(5) manpage for more details:
 [publicinbox "$name"]
 	inboxdir = $inboxdir
-	; note: public-inbox before v1.2.0 used "mainrepo"
-	; instead of "inboxdir", both remain supported after 1.2
+	; note: public-inbox before v1.2.0 used `mainrepo' instead of
+	; `inboxdir', both remain supported after 1.2
 	mainrepo = $inboxdir
 	url =$name/
 	url = http://example.onion/$name/
@@ -156,7 +158,6 @@ EOS
 		$$txt .= "\t$k = $_\n" for @$v;
 	if (my $altid = $ibx->{altid}) {
-		my $base_url = $ibx->base_url($ctx->{env});
 		my $altid_map = $ibx->altid_map;
 		$$txt .= <<EOF;
 	; altid DBs may be used to provide numeric article ID lookup from

      parent reply	other threads:[~2020-09-09 21:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 21:23 [PATCH 0/3] wwwtext: minor config example tweaks Eric Wong
2020-09-09 21:23 ` [PATCH 1/3] wwwtext: describe the use of `coderepo' entries Eric Wong
2020-09-09 21:23 ` [PATCH 2/3] wwwtext: don't blindly quote "git clone" destination Eric Wong
2020-09-09 21:23 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ \
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor:

code repositories for the project(s) associated with this inbox:

AGPL code for this site: git clone