Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Aug 2023 13:36:20 +0100
From:      Graham Perrin <grahamperrin@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: demandoc(1)
Message-ID:  <9911e4cf-3498-4221-6ba4-e7cea34f7606@freebsd.org>
In-Reply-To: <f82843b8-ebf4-01b4-825a-84bd0728fe1c@aetern.org>
References:  <0345d177-0da2-e41b-6a49-b3fe06e52be0@freebsd.org> <f82843b8-ebf4-01b4-825a-84bd0728fe1c@aetern.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06/08/2023 11:12, Yuri wrote:

> … sample usr.bin/demandoc/Makefile attached.

Success, thanks:

% man -P less 1 demandoc
% which demandoc
/usr/bin/demandoc
% file /usr/bin/demandoc
/usr/bin/demandoc: ELF 64-bit LSB pie executable, x86-64, version 1 
(FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for 
FreeBSD 14.0 (1400093), FreeBSD-style, stripped
% demandoc -w /usr/src/share/man/man9/intro.9 | spell -b | less
% demandoc -w /usr/src/share/man/man9/intro.9 | aspell list --encoding 
utf-8 | sort | uniq | less
%


Re: 
<https://docs.freebsd.org/en/books/fdp-primer/book/#manual-pages-testing>; 
– where the '--mode=nroff' part of the aspell(1) example will have 
little or no effect in most cases – it will be preferable to have aspell 
present everyday language, without markup.

For as long as there'll be no aspell filter mode for mdoc, demandoc 
might be the best workaround. I can, for example:

demandoc /usr/src/share/man/man9/intro.9 | xclip

– and then use the context menu of the system tray icon for my local 
LanguageTool server. The result, pictured: 
<https://i.imgur.com/aPSu57G.png>.


I spent a few hours searching, can't find a way to make combined use of 
demandoc with the check command of aspell; for aspell to be interactive 
with a markup-free, human-friendly view of an mdoc page (not a word 
list). If anyone has a solution in mind, I'll raise the question in 
Stack Exchange.

<https://man.freebsd.org/cgi/man.cgi?query=aspell&sektion=1&manpath=freebsd-ports>;




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9911e4cf-3498-4221-6ba4-e7cea34f7606>