unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH 0/3] www: help text tweaks
@ 2022-08-10  7:40 Eric Wong
  2022-08-10  7:40 ` [PATCH 1/3] www_text: add #nntp, #pop3, and #imap anchors to help HTML Eric Wong
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Wong @ 2022-08-10  7:40 UTC (permalink / raw)
  To: meta

Hope this is more helpful than before, already deployed to:

https://public-inbox.org/meta/_/text/help/#pop3

Eric Wong (3):
  www_text: add #nntp, #pop3, and #imap anchors to help HTML
  www_text: clarify the password+username is for POP3
  www_text: add AUTH=ANONYMOUS to IMAP URLs

 lib/PublicInbox/WwwText.pm | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] www_text: add #nntp, #pop3, and #imap anchors to help HTML
  2022-08-10  7:40 [PATCH 0/3] www: help text tweaks Eric Wong
@ 2022-08-10  7:40 ` Eric Wong
  2022-08-10  7:40 ` [PATCH 2/3] www_text: clarify the password+username is for POP3 Eric Wong
  2022-08-10  7:40 ` [PATCH 3/3] www_text: add AUTH=ANONYMOUS to IMAP URLs Eric Wong
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2022-08-10  7:40 UTC (permalink / raw)
  To: meta

This will make it easier to link to these sections in
3rd-party documentation.
---
 lib/PublicInbox/WwwText.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm
index 369328ee..320f0d84 100644
--- a/lib/PublicInbox/WwwText.pm
+++ b/lib/PublicInbox/WwwText.pm
@@ -67,6 +67,9 @@ sub get_text {
 		$txt = ascii_html($txt);
 	}
 	$txt = '<pre>' . $l->linkify_2($txt) . '</pre>';
+	$txt =~ s!\bPOP3\b!<a\nid=pop3>POP3</a>!;
+	$txt =~ s!\bNewsgroups\b!<a\nid=nntp>Newsgroups</a>!;
+	$txt =~ s!\bIMAP\b!<a\nid=imap>IMAP</a>!;
 	PublicInbox::WwwStream::html_oneshot($ctx, $code, \$txt);
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] www_text: clarify the password+username is for POP3
  2022-08-10  7:40 [PATCH 0/3] www: help text tweaks Eric Wong
  2022-08-10  7:40 ` [PATCH 1/3] www_text: add #nntp, #pop3, and #imap anchors to help HTML Eric Wong
@ 2022-08-10  7:40 ` Eric Wong
  2022-08-10  7:40 ` [PATCH 3/3] www_text: add AUTH=ANONYMOUS to IMAP URLs Eric Wong
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2022-08-10  7:40 UTC (permalink / raw)
  To: meta

NNTP and IMAP can also exist in the same area, so clarify
that the username + password is only for POP3
---
 lib/PublicInbox/WwwText.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm
index 320f0d84..71b04561 100644
--- a/lib/PublicInbox/WwwText.pm
+++ b/lib/PublicInbox/WwwText.pm
@@ -297,8 +297,8 @@ EOM
 POP3 access is available:
   $urls
 
-The password is: anonymous
-The username is: \$(uuidgen)\@$ctx->{ibx}->{newsgroup}
+The POP3 password is: anonymous
+The POP3 username is: \$(uuidgen)\@$ctx->{ibx}->{newsgroup}
 where \$(uuidgen) in the output of the `uuidgen' command on your system.
 The UUID in the username functions as a private cookie (don't share it).
 Idle accounts will expire periodically.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] www_text: add AUTH=ANONYMOUS to IMAP URLs
  2022-08-10  7:40 [PATCH 0/3] www: help text tweaks Eric Wong
  2022-08-10  7:40 ` [PATCH 1/3] www_text: add #nntp, #pop3, and #imap anchors to help HTML Eric Wong
  2022-08-10  7:40 ` [PATCH 2/3] www_text: clarify the password+username is for POP3 Eric Wong
@ 2022-08-10  7:40 ` Eric Wong
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2022-08-10  7:40 UTC (permalink / raw)
  To: meta

While the ';' requires escaping on the command-line, the
presence of ";AUTH=ANONYMOUS" communicates clearly that
anonymous access is supported in accordance to RFC 4505.
---
 lib/PublicInbox/WwwText.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm
index 71b04561..c067369e 100644
--- a/lib/PublicInbox/WwwText.pm
+++ b/lib/PublicInbox/WwwText.pm
@@ -276,10 +276,12 @@ sub _add_non_http_urls ($$) {
 	$ctx->{ibx}->can('nntp_url') or return; # TODO extindex can have IMAP
 	my $urls = $ctx->{ibx}->imap_url($ctx);
 	if (@$urls) {
-		$$txt .= "\nIMAP subfolder(s) are available under:";
-		$$txt .= "\n  " . join("\n  ", @$urls);
+		$urls = join("\n  ", @$urls);
+		$urls =~ s!://([^/@]+)/!://;AUTH=ANONYMOUS\@$1/!sg;
 		$$txt .= <<EOM
 
+IMAP subfolder(s) are available under:
+  $urls
   # each subfolder (starting with `0') holds 50K messages at most
 EOM
 	}

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-10  7:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-10  7:40 [PATCH 0/3] www: help text tweaks Eric Wong
2022-08-10  7:40 ` [PATCH 1/3] www_text: add #nntp, #pop3, and #imap anchors to help HTML Eric Wong
2022-08-10  7:40 ` [PATCH 2/3] www_text: clarify the password+username is for POP3 Eric Wong
2022-08-10  7:40 ` [PATCH 3/3] www_text: add AUTH=ANONYMOUS to IMAP URLs Eric Wong

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).