Re: man pages in plain text - how to?

2006-06-13 Thread Alex Zbyslaw

[EMAIL PROTECTED] wrote:


On  Fri, 9 Jun 2006 15:28:07 -0400 , Charles Swiger wrote:
snip
 


On Jun 9, 2006, at 3:01 PM, Wayne wrote:
   

Was wondering how to get man to output pages in plain text? I want 
the basic formating (indentation  whatnot) but NOT the bold and other 
special effects.  Just ascii text I can grep through.  I tried setting 
the terminal type to dumb and the stupid thing still tries to do 
back-space overstrike bolding (jeesh - even LA-120s had fancier print 
capabilities than that, IIRC.)
 


snip
The easiest way to do it, I believe, is with  col .  (Just try 'man
col' to check all the options.)  I have used 'man  topic  |  col -b' to
see the man page for  topic  with all the egregious stuff removed, and
I just append to the pipeline 'topic.man' if I want to save it.


 


Or, e.g.:

gzcat /usr/share/man/man1/man.1.gz | nroff -man -Tascii | colcrt

Man is just calling nroff (unless there's a pre-cat-ed page).

--Alex


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: man pages in plain text - how to?

2006-06-12 Thread [EMAIL PROTECTED]
On  Fri, 9 Jun 2006 15:28:07 -0400 , Charles Swiger wrote:
snip
 On Jun 9, 2006, at 3:01 PM, Wayne wrote:
 Was wondering how to get man to output pages in plain text? I want 
 the basic formating (indentation  whatnot) but NOT the bold and other 
 special effects.  Just ascii text I can grep through.  I tried setting 
 the terminal type to dumb and the stupid thing still tries to do 
 back-space overstrike bolding (jeesh - even LA-120s had fancier print 
 capabilities than that, IIRC.)
snip
The easiest way to do it, I believe, is with  col .  (Just try 'man
col' to check all the options.)  I have used 'man  topic  |  col -b' to
see the man page for  topic  with all the egregious stuff removed, and
I just append to the pipeline 'topic.man' if I want to save it.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


man pages in plain text - how to?

2006-06-09 Thread Wayne

Hi,

Was wondering how to get man to output pages in plain text?  I want 
the basic formating (indentation  whatnot) but NOT the bold and other 
special effects.  Just ascii text I can grep through.  I tried setting 
the terminal type to dumb and the stupid thing still tries to do 
back-space overstrike bolding (jeesh - even LA-120s had fancier print 
capabilities than that, IIRC.)


  -Thanks,  Wayne
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: man pages in plain text - how to?

2006-06-09 Thread Benjamin A'Lee
On Fri, Jun 09, 2006 at 03:01:14PM -0400, Wayne wrote:
 Was wondering how to get man to output pages in plain text?  I want 
 the basic formating (indentation  whatnot) but NOT the bold and other 
 special effects.  Just ascii text I can grep through.  I tried setting 
 the terminal type to dumb and the stupid thing still tries to do 
 back-space overstrike bolding (jeesh - even LA-120s had fancier print 
 capabilities than that, IIRC.)

'col -b' will strip out the bold effects etc.

bma

-- 
Benjamin A'Lee - http://bmalee.eu/~bma/
Secretary, TermiSoc - http://termisoc.org/
It couldn't be me and be her in between without you - The Cure,
Inbetween Days


pgp167luFc18b.pgp
Description: PGP signature


Re: man pages in plain text - how to?

2006-06-09 Thread Charles Swiger

On Jun 9, 2006, at 3:01 PM, Wayne wrote:
Was wondering how to get man to output pages in plain text?  I  
want the basic formating (indentation  whatnot) but NOT the bold  
and other special effects.  Just ascii text I can grep through.  I  
tried setting the terminal type to dumb and the stupid thing  
still tries to do back-space overstrike bolding (jeesh - even  
LA-120s had fancier print capabilities than that, IIRC.)


  env TERM=dumb PAGER=ul man man

...seemed to work OK for me, compare this to not specifying a pager  
when you redirect the output to a file.  Reading man grotty might  
give you additional things to tweak...


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: man pages in plain text - how to?

2006-06-09 Thread David Kelly
On Fri, Jun 09, 2006 at 03:01:14PM -0400, Wayne wrote:
 Hi,
 
 Was wondering how to get man to output pages in plain text?  I want 
 the basic formating (indentation  whatnot) but NOT the bold and other 
 special effects.  Just ascii text I can grep through.  I tried setting 
 the terminal type to dumb and the stupid thing still tries to do 
 back-space overstrike bolding (jeesh - even LA-120s had fancier print 
 capabilities than that, IIRC.)

% man man | more

the / command in more/less is a grep-like search.

But if you really really want plainest of plain text then man -t will
generate postscript, pipe it into ps2ascii (in the Ghostscript port) and
the result will be long lines but very plain text.

With proper print filters installed man -t man | lpr produces beautiful
printed man pages.

-- 
David Kelly N4HHE, [EMAIL PROTECTED]

Whom computers would destroy, they must first drive mad.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]