unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 2/3] doc: switch to man(1) for pod => (text|html)
Date: Wed,  3 Nov 2021 21:01:22 +0000	[thread overview]
Message-ID: <20211103210123.6173-3-e@80x24.org> (raw)
In-Reply-To: <20211103210123.6173-1-e@80x24.org>

pod2text(1) will wrap long .onion URLs and cause resulting HTML
to be linkified improperly.
---
 Documentation/include.mk | 8 ++------
 Makefile.PL              | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/Documentation/include.mk b/Documentation/include.mk
index af5f7f24..bfbc495f 100644
--- a/Documentation/include.mk
+++ b/Documentation/include.mk
@@ -14,17 +14,13 @@ XMLSTARLET = xmlstarlet
 # libgraph-easy-perl from Debian, Graph::Easy from CPAN
 GRAPH_EASY = graph-easy
 
-# same as pod2text
-COLUMNS = 76
-
 INSTALL = install
 PODMAN = pod2man
 PODMAN_OPTS = -v --stderr -d 1993-10-02 -c 'public-inbox user manual'
 PODMAN_OPTS += -r public-inbox.git
 podman = $(PODMAN) $(PODMAN_OPTS)
-PODTEXT = pod2text
-PODTEXT_OPTS = --stderr
-podtext = $(PODTEXT) $(PODTEXT_OPTS)
+
+man2text = COLUMNS=80 MANWIDTH=80 TERM=dumb MANOPT='--nj --nh' man
 
 all:: man
 
diff --git a/Makefile.PL b/Makefile.PL
index b7851ada..fffe30e9 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -72,7 +72,7 @@ for my $i (@sections) {
 		my $pod = "Documentation/$m.pod";
 		my $txt = "Documentation/$m.txt";
 		$t->{"$m.$i : $pod"} = [ "\$(podman) -s$i $pod \$@" ];
-		$t->{"$txt : $pod"} = [ "\$(podtext) $pod \$\@+",
+		$t->{"$txt : $m.$i"} = [ "\$(man2text) ./$m.$i >\$\@+",
 					"touch -r $pod \$\@+",
 					"mv \$\@+ \$@" ];
 		$t->{"Documentation/$m.html : $txt"} = [ "\$(txt2pre) <$txt" ];

  parent reply	other threads:[~2021-11-03 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 21:01 [PATCH 0/3] another round of doc tweaks Eric Wong
2021-11-03 21:01 ` [PATCH 1/3] doc: add more 3rd-party refs, use Debian manpages for xapian Eric Wong
2021-11-03 21:01 ` Eric Wong [this message]
2021-11-03 21:01 ` [PATCH 3/3] doc: txt2pre: linkify a add a few more well-known things Eric Wong

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=20211103210123.6173-3-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).