/srv/irclogs.ubuntu.com/2011/11/17/#ubuntu-doc.txt

=== duanedes1gn is now known as M0hi
=== M0hi is now known as Guest96191
=== Guest96191 is now known as duanedesign
=== bregma_ is now known as bregma
xXx8xXxhi, can i have 1 question about man pages?14:16
=== jjesse_ is now known as jjesse
xXx8xXxim good in this room, when i have questions about man pages?14:26
xXx8xXxhm? :)14:33
xXx8xXxhelp:D14:34
xXx8xXxis here anyone?14:48
MrChrisDruifxXx8xXx; yup14:49
xXx8xXxoo thx :)14:49
MrChrisDruifAnd 25 others, but I can't confirm they're all active14:49
xXx8xXxcan i have questin about man page?14:49
MrChrisDruifsup?14:49
MrChrisDruifWell...if you ask I can see if I can answer it =)14:50
xXx8xXxman pages consist from more sections ( description, see also, history, bugs)14:50
xXx8xXxcan i for example through groff generate only 1 from this section?14:50
MrChrisDruifI don't follow your drift?14:52
xXx8xXxsry ma english is bad14:53
xXx8xXxman page: description, history, bugs, see also etc ..14:54
xXx8xXxi need only 1 section from all this section, for example scetion SEE ALSo14:54
xXx8xXxgroff -Tascii -a -man14:54
xXx8xXxcan i do this with groff?14:55
MrChrisDruifI'm not an expert, but what happens when you try that?14:55
xXx8xXxyes, this generate full man page14:56
xXx8xXxbut i nedd only 1 section14:56
xXx8xXxnot full man page14:56
MrChrisDruifHave you tried "man -a 'whatever' | groff -T"?15:01
bregmaxXx8xXx, no groff will not do that15:02
MrChrisDruifI'm not sure about | but with that pipe as it's called you direct the other program15:02
xXx8xXxmust not only with groff15:03
xXx8xXxi can use other commands15:03
xXx8xXxcan you show me some example with | ?15:03
bregmagroff is just a runoff processor, it does not understand the semantics of the text15:03
bregmayou could write a python script that would extract what you need from the groff -Tascii output15:04
xXx8xXxim programming my program in python:)15:06
xXx8xXxbut see also can be in the end of man page15:06
xXx8xXxand also it possible that see also isnt in the end of man page15:07
xXx8xXxfor example man page:15:07
xXx8xXxDESCRIPTION15:07
xXx8xXxSEE ALSO15:07
xXx8xXxthe end15:07
xXx8xXxbut can be:15:07
xXx8xXxDESCRIPTION15:07
xXx8xXxSEE ALSO15:07
xXx8xXxBUGS15:07
xXx8xXxHISTORY15:07
xXx8xXxthe end15:07
xXx8xXxhow can i do this in python when i wanna only see also section?15:08
bregmaall I can suggest is reading through the text matching section headers, and when you see the one you want, grab all the text up to the next section header or end of file15:10
bregmasection headers are documented in 'man man-pages'15:10
xXx8xXxthank you, but for example COLOPHON or HISTORY is not in man-pages15:12
xXx8xXxand i see this 2 headers in some man page15:12
bregmaif you're parsing the raw groff input, you can rely on .SH as the section header directive, problem is then you have raw groff input as your text15:16
xXx8xXxyes, i parse text generated from groff15:17
xXx8xXxnot source man page15:18

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!