Sponsored Content
The Lounge What is on Your Mind? PHP Man Pages Now Available (Over 10,000) Post 302886454 by Neo on Friday 31st of January 2014 03:47:01 PM
Old 01-31-2014
OK. I found out why apropos does not work for the PHP manpages.

apropos is dependent on parsing the formatted manpages to create the whatis database for each manpage set, as discussed in mandb

Where we see:

Quote:
DIAGNOSTICS
The following warning messages can be emitted during database building.

<filename>: whatis parse for page(sec) failed
An attempt to extract whatis line(s) from the given <filename>
failed. This is usually due to a poorly written manual page,
but if many such messages are emitted it is likely that the sys-
tem contains non-standard manual pages which are incompatible
with the man-db whatis parser. See the WHATIS PARSING section
in lexgrog(1) for more information.
So, I used lexgrog on the PHP manpages and got the parse error; and when I examined the PHP manpages files, it's easy to see the pages are very poorly formatted (compared to "standard" manpages for linux and osx) and would require a lot of reformatting to get the parser to work so whatis would work, etc.

Hahaha... if anyone cares to reformat over 10,000 PHP pages so the lexgrog parser works on the PHP manpages, please raise your hand... otherwise, well will accept the fact that the PHP manpages will not be including in our recursive apropos (whatis) search.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Man pages

Hello , I just installed openssh in my system . I actually tried to man sshd but it says no entry , though there is a man directory in the installation which have the man pages for sshd . Can anyone tell me how should i install these man pages . DP (2 Replies)
Discussion started by: DPAI
2 Replies

2. UNIX for Dummies Questions & Answers

man pages

Hi, I've written now a man pages, but I don't knwo how to get 'man' to view them. Where have I to put this files, which directories are allowed?? THX Bensky (3 Replies)
Discussion started by: bensky
3 Replies

3. UNIX for Dummies Questions & Answers

Man pages query....

Hello,,, can I use any command in order to be able to see man pages,,, page per page instead for running too fast???:confused: (6 Replies)
Discussion started by: spyros
6 Replies

4. UNIX for Dummies Questions & Answers

man pages

Hi folks, I want to know all the commands for which man pages are available. How do i get it? Cheers, Nisha (4 Replies)
Discussion started by: Nisha
4 Replies

5. UNIX for Dummies Questions & Answers

man pages

When reading man pages, I notice that sometimes commands are follwed by a number enclosed in parenthesis. such as: mkdir calls the mkdir(2) system call. What exactly does this mean? (4 Replies)
Discussion started by: dangral
4 Replies

6. UNIX for Dummies Questions & Answers

how to read man pages

can anybody explain me how to read unix man pages? for example when i want to get information about ps command man ps gives me this output: *********************************** Reformatting page. Please wait... completed ps(1) ... (2 Replies)
Discussion started by: gfhgfnhhn
2 Replies

7. Solaris

MAN PAGES

Hi everyone, I have a small query, in solaris the man pages get displayed on half of the terminal , can i get a full terminal or full screen display ?:) (2 Replies)
Discussion started by: M.Choudhury
2 Replies

8. HP-UX

Looking for some man pages.

Can anyone supply me with the man pages for: omnidatalist omnibarlist omnisap.exe I prefer the source man pages in nroff format. A clue about the software bundles which supply these man pages is fine as well. OS: HP-UX TIA (11 Replies)
Discussion started by: sb008
11 Replies
LEXGROG(1)							Manual pager utils							LEXGROG(1)

NAME
lexgrog - parse header information in man pages SYNOPSIS
lexgrog [-m|-c] [-fhwV] [-E encoding] file ... DESCRIPTION
lexgrog is an implementation of the traditional "groff guess" utility in lex. It reads the list of files on its command line as either man page source files or preformatted "cat" pages, and displays their name and description as used by apropos and whatis, the list of prepro- cessing filters required by the man page before it is passed to nroff or troff, or both. If its input is badly formatted, lexgrog will print "parse failed"; this may be useful for external programs that need to check man pages for correctness. If one of lexgrog's input files is "-", it will read from standard input; if any input file is compressed, a decompressed version will be read automatically. OPTIONS
-m, --man Parse input as man page source files. This is the default if neither --man nor --cat is given. -c, --cat Parse input as preformatted man pages ("cat pages"). --man and --cat may not be given simultaneously. -w, --whatis Display the name and description from the man page's header, as used by apropos and whatis. This is the default if neither --whatis nor --filters is given. -f, --filters Display the list of filters needed to preprocess the man page before formatting with nroff or troff. -E encoding, --encoding encoding Override the guessed character set for the page to encoding. -h, --help Print a help message and exit. -V, --version Display version information. EXIT STATUS
0 Successful program execution. 1 Usage error. 2 lexgrog failed to parse one or more of its input files. EXAMPLES
$ lexgrog man.1 man.1: "man - an interface to the on-line reference manuals" $ lexgrog -fw man.1 man.1 (t): "man - an interface to the on-line reference manuals" $ lexgrog -c whatis.cat1 whatis.cat1: "whatis - display manual page descriptions" $ lexgrog broken.1 broken.1: parse failed WHATIS PARSING
mandb (which uses the same code as lexgrog) parses the NAME section at the top of each manual page looking for names and descriptions of the features documented in each. While the parser is quite tolerant, as it has to cope with a number of different forms that have histori- cally been used, it may sometimes fail to extract the required information. When using the traditional man macro set, a correct NAME section looks something like this: .SH NAME foo - program to do something Some manual pagers require the '-' to be exactly as shown; mandb is more tolerant, but for compatibility with other systems it is never- theless a good idea to retain the backslash. On the left-hand side, there may be several names, separated by commas. Names containing whitespace will be ignored to avoid pathological behaviour on certain ill-formed NAME sections. The text on the right-hand side is free-form, and may be spread over multiple lines. If several features with different descriptions are being documented in the same manual page, the following form is therefore used: .SH NAME foo, bar - programs to do something .br baz - program to do nothing (A macro which starts a new paragraph, like .PP, may be used instead of the break macro .br.) When using the BSD-derived mdoc macro set, a correct NAME section looks something like this: .Sh NAME .Nm foo .Nd program to do something There are several common reasons why whatis parsing fails. Sometimes authors of manual pages replace '.SH NAME' with '.SH MYPROGRAM', and then mandb cannot find the section from which to extract the information it needs. Sometimes authors include a NAME section, but place free-form text there rather than 'name - description'. However, any syntax resembling the above should be accepted. SEE ALSO
man(1), mandb(8), apropos(1), whatis(1). NOTES
lexgrog attempts to parse files containing .so requests, but will only be able to do so correctly if the files are properly installed in a manual page hierarchy. AUTHOR
The code used by lexgrog to scan man pages was written by: Wilf. (G.Wilford@ee.surrey.ac.uk). Fabrizio Polacco (fpolacco@debian.org). Colin Watson (cjwatson@debian.org). Colin Watson wrote the current incarnation of the command-line front-end, as well as this man page. 2.6.0.2 2011-04-13 LEXGROG(1)
All times are GMT -4. The time now is 05:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy