[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running the grohtml pipeline as a pipeline
From: |
G. Branden Robinson |
Subject: |
Re: Running the grohtml pipeline as a pipeline |
Date: |
Fri, 22 Mar 2024 13:53:51 -0500 |
Hi Alex,
At 2024-03-18T12:38:30+0100, Alejandro Colomar wrote:
> I'm considering using grohtml(1) in the Linux man-pages, to replace
> man2html(1), which crashes on tzfile(5) --which has correct man(7)--.
Well, all right. Demand may drive improvement to grohtml more reliably
than abandonment and neglect have.
> Currently, I'm running groff(1) as its separate constituents:
>
> $ make build-ps -Wman2/membarrier.2
> PRECONV .tmp/man/man2/membarrier.2.tbl
> TBL .tmp/man/man2/membarrier.2.eqn
> EQN .tmp/man/man2/membarrier.2.ps.troff
> TROFF .tmp/man/man2/membarrier.2.ps.set
> GROPS .tmp/man/man2/membarrier.2.ps
>
> which runs
>
> $ make build-ps -Wman2/membarrier.2 --debug=print \
> | grep -Pv '^[[:upper:]]+\t';
> preconv man2/membarrier.2 >.tmp/man/man2/membarrier.2.tbl
> tbl <.tmp/man/man2/membarrier.2.tbl >.tmp/man/man2/membarrier.2.eqn
> ! (eqn -Tps <.tmp/man/man2/membarrier.2.eqn 2>&1
> >.tmp/man/man2/membarrier.2.ps.troff) \
> | grep ^ >&2
> ! (troff -man -Tps -wbreak <.tmp/man/man2/membarrier.2.ps.troff 2>&1
> >.tmp/man/man2/membarrier.2.ps.set) \
> | grep ^ >&2
> grops <.tmp/man/man2/membarrier.2.ps.set
> >.tmp/man/man2/membarrier.2.ps
>
> What pipeline do you recommend for HTML, using a similar pattern?
> So far, the only thing that seems to work is
>
> $ preconv man2/membarrier.2 \
> | tbl \
> | troff -man -Thtml -wbreak man3/_Generic.3 \
> | post-grohtml >g.html;
>
> Although from pre-grohtml(1), maybe I shouldn't be running tbl(1)
> myself?
grohtml uniquely runs its own output-driver-specific preprocessor, but
more significantly, that preprocessor _runs troff_. The main reason
"groff -Thtml" is relatively slow is because it runs troff as part of
running troff, scraping out chunks of PostScript and converting them to
images.
I'm not _certain_ that what you're trying to do can't be expected to
work. I had suspected that tbl(1) had hooks in it for pre-grohtml(1)
support (by testing the `ps4html` register, the usual way this is done),
but it doesn't.
In fact, spending a few minutes looking at it, I'm not seeing anything
that seems like it should foreclose what you're trying to do.
Can you share an exhibit of a pipeline that fails and describe _how_ it
fails?
Regards,
Branden
signature.asc
Description: PGP signature
- Running the grohtml pipeline as a pipeline, Alejandro Colomar, 2024/03/18
- Re: Running the grohtml pipeline as a pipeline,
G. Branden Robinson <=
- Re: Running the grohtml pipeline as a pipeline, Alejandro Colomar, 2024/03/22
- Re: Running the grohtml pipeline as a pipeline, G. Branden Robinson, 2024/03/22
- Re: Running the grohtml pipeline as a pipeline, Alejandro Colomar, 2024/03/22
- Re: Running the grohtml pipeline as a pipeline, G. Branden Robinson, 2024/03/22
- Re: Running the grohtml pipeline as a pipeline, Alejandro Colomar, 2024/03/22
- Re: Running the grohtml pipeline as a pipeline, G. Branden Robinson, 2024/03/22
- Re: Running the grohtml pipeline as a pipeline, Alejandro Colomar, 2024/03/22
- The varieties of mdoc experience (was: Running the grohtml pipeline as a pipeline), G. Branden Robinson, 2024/03/23