baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
- From: Lee Forrest <lforrestster AT gmail.com>
- To: baslinux AT lists.ibiblio.org
- Subject: Re: [BL] Man2text2 Sed Scripts for Nroff
- Date: Fri, 5 Jan 2007 17:06:46 +0000
On Fri, Jan 05, 2007 at 03:06:05PM -0800, David Moberg wrote:
> Lee Forrest wrote:
> > This is from the sed&awk book. I haven't tested it
> > because the only manpages I have are not in nroff.
> >
> > s/.^H//g
> > s/^[9//g
> > s/^[ ^I]*//g
> > s/^I/ /g
>
> This removes the non-printing characters or replaces them
> with spaces?
Only the last line. They are eliminated in the other 3, with
the first one removing any character before the ^H too.
> That will extract plain text, I think.
That's the idea.
> Is there
> an easy way to use ANSI escape sequences (for colors, bold,
> highlighting)? Perhaps a separate script could handle those.
It can be done. Steven knows how.
> [troff]
>
> > I wrote a crude script using sed that reformats them, and
> > will be doing some work on it. Search "man2text1.sh" in the
> > archives.
>
> I tried it on a random manpage and it didn't work quite right,
That's what I meant by 'crude' :-)
> although the output was mostly plain text.
That's the intent. The object is have man pages one can easily
edit.
> Perhaps this was a nroff or groff script?
For troff.
> I will experiment with what you have
> posted.
Good. Be sure to post any improvements.
> Thanks for sharing these sed scripts.
Sure. I just want to contribute _something_, and Sindi raised the
question a while back.
Lee
--
BasicLinux: Small is Beautiful
http://www.basiclinux.com.ru
-
[BL] Man2text2 Sed Scripts for Nroff,
Lee Forrest, 01/05/2007
-
Re: [BL] Man2text2 Sed Scripts for Nroff,
David Moberg, 01/05/2007
- Re: [BL] Man2text2 Sed Scripts for Nroff, sindi keesan, 01/05/2007
- Re: [BL] Man2text2 Sed Scripts for Nroff, Lee Forrest, 01/05/2007
-
Re: [BL] Man2text2 Sed Scripts for Nroff,
David Moberg, 01/05/2007
Archive powered by MHonArc 2.6.24.