From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 3/3] wwwtext: config comment improvements
Date: Wed, 9 Sep 2020 21:23:26 +0000 [thread overview]
Message-ID: <20200909212326.19561-4-e@80x24.org> (raw)
In-Reply-To: <20200909212326.19561-1-e@80x24.org>
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
double-quotes.
We'll also reflow the `mainrepo' vs `inboxdir' comment slightly
to emphasize the word `instead'.
---
lib/PublicInbox/WwwText.pm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm
index 99aec370..04c9b1c4 100644
--- a/lib/PublicInbox/WwwText.pm
+++ b/lib/PublicInbox/WwwText.pm
@@ -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:
; https://public-inbox.org/public-inbox-config.html
[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 = https://example.com/$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
prev 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200909212326.19561-4-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).