shaff@elements.rpal.com (Mike Shaff) (08/21/90)
ciao, Sometime back I posted a message regarding the updating of the database file /usr/lib/whatis. Not one answer (though there were several people who wanted the information to be passed their way if I got any pointers). Is there really no one out there who has successfully gotten the whatis database to include new man pages? Further, I have come to a realization that I can not find any documentation on adding man pages with regards to compaction, etc. (No, we have not gotten our stand-alone documents yet, so I can not read the manual) Surely, someone must have some ideas out there? -- mas Major said, "Why don't we give him Rope enough to hang himself? No need to worry the jury They'll probably take care of themselves"
rmtodd@servalan.uucp (Richard Todd) (08/21/90)
shaff@elements.rpal.com (Mike Shaff) writes: >the information to be passed their way if I got any pointers). Is there really >no one out there who has successfully gotten the whatis database to include new >man pages? Either that or noone has cared sufficiently to look into it. (Personally, I don't recall ever having *used* the whatis database, so I haven't really had an incentive to look into seeing how it can be updated...) Looks like a straight text file, so you should be able to just add the appropriate lines to the whatis database by hand, or do some suitably clever automatic massaging of the troff source to the man pages. >Further, I have come to a realization that I can not find any documentation on >adding man pages with regards to compaction, etc. (No, we have not gotten our >stand-alone documents yet, so I can not read the manual) Well, one might have tried looking through /usr/bin/man (it *is* a shell script, unlike on BSD), so you can readily find what the proper format is. In any event, here is a shell script that'll convert a man page (in troff-input format) to the proper format to be put in one of the /usr/catman/?_man/man? directories (give the name of the man page as the first argument; note that this *will* trample on your original troff source file.) Enjoy. ------------ #!/bin/sh # convert a man page to nroffed packed format target=$1 dir=`dirname $1` nroff -man $target >$dir/convman$$ mv $dir/convman$$ $target pack $target -- Richard Todd rmtodd@uokmax.ecn.uoknor.edu rmtodd@chinet.chi.il.us rmtodd@servalan.uucp Motorola Skates On Intel's Head!
andyp@treehouse.UUCP (Andy Peterman) (08/21/90)
In article <SHAFF.90Aug20153725@neon.elements.rpal.com> shaff@rpal.com writes: >Sometime back I posted a message regarding the updating of the database file >/usr/lib/whatis. Not one answer (though there were several people who wanted >the information to be passed their way if I got any pointers). Is there really >no one out there who has successfully gotten the whatis database to include new >man pages? The biggest problem with this is you first need to unpack each man page and then you need to extact the line following the NAME line. If you think this is simple, do a 'cat -v /usr/catman/u_man/man1/users.1' for an example of some of the hidden characters in a man page. I think the multiple characters and backspaces are because nroff thinks you're printing this on a printer and wants 'NAME' to be bold. I wish the manual pages, which are normally just displayed on a CRT, were a little more efficient (the limitations of nroff, I guess!). >Further, I have come to a realization that I can not find any documentation on >adding man pages with regards to compaction, etc. (No, we have not gotten our >stand-alone documents yet, so I can not read the manual) I've created a simple script, called makeman, that will nroff and pack the manual page. The syntax is 'makeman <filename>' where <filename> is an nroff manual document of the form xxx.[1-8]: #!/bin/sh # if [ "$1" != "" ]; then nroff -man $1 > tmp mv tmp $1 pack $1 fi After running the script, move the file (now of the form xxx.[1-8].z) to the correct u_man or a_man subdirectory. Make sure its permission allows reading by everyone. Andy Peterman treehouse!andyp@gvgpsa.gvg.tek.com
shaff@elements.rpal.com (Mike Shaff) (08/21/90)
ciao, Either that or noone has cared sufficiently to look into it. (Personally, I don't recall ever having *used* the whatis database, so I haven't really had an incentive to look into seeing how it can be updated...) Ever done an 'apropos' or the command whatis (man -k in BSD)? If you have then you HAVE used the whatis database. -- mas Major said, "Why don't we give him Rope enough to hang himself? No need to worry the jury They'll probably take care of themselves"
scott@unisoft.UUCP (Scott Gustafson) (08/22/90)
shaff@elements.rpal.com (Mike Shaff) writes: >ciao, >Sometime back I posted a message regarding the updating of the database file >/usr/lib/whatis. Not one answer (though there were several people who wanted >the information to be passed their way if I got any pointers). Is there really >no one out there who has successfully gotten the whatis database to include new >man pages? Well, I just used vi to update the file (as su) and added the new commands: gcc(1) - Optimizing C compiler gpc(1) - Optimizing Pascal compiler gf77(1) - Optimizing Fortran compiler Then I did a whatis on the three of them, and it worked fine. If you want to do all of this in a script, just have the script append the name of the command with the discription to the end of the file, and then sort the file whatis. (If you need more information on this, e-mail me.) >Further, I have come to a realization that I can not find any documentation on >adding man pages with regards to compaction, etc. >Surely, someone must have some ideas out there? To add a man page: 1. Take your formatted man page that you just made or were supplied and compact it with the following command: compact [name...] This will leave your man page in the correct format (with a .z after the name, i.e. gcc.1.z) 2. Determine what section your man page will be and put it in the right directory. In my example gcc.1.z went into /usr/catman/u_man/man1. All of the man pages are in /usr/catman and depending on what section it is, they will go into a_man or u_man and then the appropriate section. > mas Scott Gustafson UniSoft Corp., 10700 N. DeAnza Blvd., Cupertino, CA 95014 (408) 366-4901 {uunet,hoptoad,fai,bdt,sun,lll-lcc,mtxinu,basis,ucbvax,apple}!unisoft!scott
eddyg@cogs.sussex.ac.uk ("Edward J. Groenendaal") (08/22/90)
Hi, If anyone is interested a good way of saving disk space is to enable the man shell script to read files other than compacted cattable files, I've extended mine to use : 1) compressed files (more savings than compacted) 2) nroff source code 3) compressed nroff source code (massive savings) 4) compacted nroff source code (large savings) Just look at the end of the shell script it should be obvious how to add these options, if not email me and I'll send you a copy. *------------------------------------------------------------------------------* | Edward Groenendaal | 'Tis time this heart should be unmoved,| | Cognitive and Computing Sciences, | Since others it hath ceased to move: | | University of Sussex, Brighton. | Yet, though I cannot be beloved, | | E-Mail: eddyg@cogs.sussex.ac.uk | Still let me love! | *------------------------------------------------------------------------------*