groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WAYTO: indexed man pages


From: Larry Kollar
Subject: Re: WAYTO: indexed man pages
Date: Sat, 29 May 2021 23:51:44 -0400

James K. Lowden <jklowden@schemamania.org> wrote:
> 
> gromunity: 
> 
> In working with my GUI man page viewer (not ready for its first
> audition yet) I found myself asking how indexes could be implemented in
> current and future man systems, and what groff would have to produce
> for a viewer to provide an index affordance. What follows is my
> analysis of where we are, and a few suggestions on where we might go.
> I'm hoping for better ideas and a sense of the senate.

I might not be the right person for current and future systems, but I can
speak to the past.

In the 80s, some Unix systems used a “permuted index” (I called it a
“perverted index” but same diff, it’s also called a KWIC index for “Key Word
In Context") to index manpages. The indexer would scrape /usr/man (or
/usr/share/man these days) and collect the arguments to .TH (to create the
anchor) and the line following .SH NAME (for the terms). It would rotate the
terms, throwing out noise words, then format the index. An example can be
found at:

http://en.wikipedia.org/wiki/Key_Word_in_Context 
<http://en.wikipedia.org/wiki/Key_Word_in_Context>

I built one of these at my first tech writing job. The developers handed me a
copy of the BSTJ that described how to do it, and I coded it up. Probably one
of my first really significant awk scripts.


Now that I think of it, the current system is makewhatis/apropos. I often get
a ton of noise entries, usually perl modules, but maybe there’s a way around
that.

— Larry
Unix Text Processing (“UTP Revival”) now at: 
https://github.com/larrykollar/Unix-Text-Processing 
<https://github.com/larrykollar/Unix-Text-Processing>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]