| 1 |
Since May 2002, Netpbm does not have traditional man pages for |
| 2 |
documentation. BUT YOU CAN CONFIGURE NETPBM, IF YOU WANT, SO YOU GET |
| 3 |
ESSENTIALLY THE SAME 'MAN' FUNCTION AS WITH A TRADITIONAL UNIX PACKAGE. |
| 4 |
|
| 5 |
Netpbm's maintainer believes man pages are obsolete and too limiting, |
| 6 |
and doesn't have time to maintain the documentation in multiple |
| 7 |
formats. So instead of classic nroff man page format, the Netpbm |
| 8 |
documentation is available as HTML, with one HTML file per program, |
| 9 |
plus some others. The current user manual is accessible on the World |
| 10 |
Wide Web at <http://netpbm.sourceforge.net/doc>, and if it's practical |
| 11 |
for you, you should access it there instead of making a local copy. |
| 12 |
This manual is always up to date. It is not maintained on a release |
| 13 |
schedule like the source code is, but rather updated continuously. |
| 14 |
The user manual describes past Netpbm function as well as the present, |
| 15 |
so you can use the current manual with old Netpbm code. |
| 16 |
|
| 17 |
|
| 18 |
INSTALLING A LOCAL COPY OF DOCUMENTATION |
| 19 |
---------------------------------------- |
| 20 |
|
| 21 |
If accessing the manual on the World Wide Web is not convenient for you (for |
| 22 |
example, if you want to access it from a computer that is not always connected |
| 23 |
to the Internet), just make a local copy of the HTML files. |
| 24 |
|
| 25 |
You can get the files from the Subversion repository using the Subversion |
| 26 |
client program 'svn': |
| 27 |
|
| 28 |
URL=https://svn.code.sf.net/p/netpbm/code/userguide |
| 29 |
svn export $URL |
| 30 |
|
| 31 |
This creates a directory "userguide" in your current directory containing |
| 32 |
all the same files that are on the web site. |
| 33 |
|
| 34 |
|
| 35 |
An alternative is just to copy the web site with something like GNU Wget. |
| 36 |
However, the Sourceforge web server has limitations on how much you can |
| 37 |
download. In a February 2012 experiment, Sourceforge started refusing HTTP |
| 38 |
requests (with an Internal Server Error indication and a message saying there |
| 39 |
had been too many requests) before all the files could be fetched. But you |
| 40 |
can use Wget controls to fool Sourceforge. The following worked in January |
| 41 |
2016: |
| 42 |
|
| 43 |
wget --wait=1 --random-wait \ |
| 44 |
--recursive --relative http://netpbm.sourceforge.net/doc/ |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
GETTING COMMAND HELP WITH A "MAN" COMMAND |
| 49 |
----------------------------------------- |
| 50 |
|
| 51 |
You can get the same quick access to program documentation with this |
| 52 |
HTML setup as with traditional man pages, using the Manweb program. |
| 53 |
This works whether you use the www copy or a local copy of the HTML |
| 54 |
files. Manweb is distributed with Netpbm. With Manweb and Netpbm |
| 55 |
installed and configured appropriately (see below), you can type |
| 56 |
|
| 57 |
man netpbm |
| 58 |
|
| 59 |
and get the top level page of the Netpbm user manual (with hyperlinks to |
| 60 |
all the other pages), or |
| 61 |
|
| 62 |
man netpbm ppmtogif |
| 63 |
|
| 64 |
or |
| 65 |
|
| 66 |
man ppmtogif |
| 67 |
|
| 68 |
to go straight to the Ppmtogif documentation. |
| 69 |
|
| 70 |
Installnetpbm normally installs Manweb and the netpbm.url file that |
| 71 |
Manweb needs to find the Netpbm documentation. Through the Configure |
| 72 |
dialog, or editing config.mk, you determine whether Manweb |
| 73 |
accesses the master web copy or a local copy you installed. |
| 74 |
|
| 75 |
Installnetpbm installs the program as 'manweb'. If you want to invoke |
| 76 |
it as 'man', you'll have to set that up yourself. Perhaps with a |
| 77 |
symbolic link from 'man' to 'manweb'. Note that 'manweb' is mostly |
| 78 |
backward compatible with 'man' so that this is a reasonable thing to |
| 79 |
do. Manweb can find documentation on the web, in HTML files, in GNU |
| 80 |
info files, and in traditional man pages. |
| 81 |
|
| 82 |
|
| 83 |
In a standard installation of Netpbm, Installnetpbm also creates a |
| 84 |
traditional man page for every Netpbm program it installs, but the man |
| 85 |
page just tells you to go to the HTML file. This way, even if the "man" |
| 86 |
program isn't capable of reading the HTML documentation and even if the |
| 87 |
user doesn't know specifically where Netpbm documentation lives, he isn't |
| 88 |
stranded without information. |
| 89 |
|
| 90 |
|
| 91 |
VIEWING NETPBM DOC WITH TRADITIONAL MAN PROGRAM |
| 92 |
----------------------------------------------- |
| 93 |
|
| 94 |
Some people want to be able to access the Netpbm documentation with an |
| 95 |
existing man program that doesn't know HTML. You can install the |
| 96 |
documentation that way, with some loss of quality. There are two |
| 97 |
ways: |
| 98 |
|
| 99 |
1) convert the HTML to troff with the 'makeman' program in the |
| 100 |
'buildtools' directory of the Netpbm source tree. This is a |
| 101 |
Python program. |
| 102 |
|
| 103 |
2) convert the HTML to formatted plain text (suitable as man "cat" |
| 104 |
pages) with the 'makecat' program in the 'buildtools' directory |
| 105 |
of the Netpbm source tree. This program uses the dump feature |
| 106 |
of the lynx text web browser for conversion. |
| 107 |
|
| 108 |
The "loss of quality" mentioned above is because: |
| 109 |
|
| 110 |
- The classic Unix manual format isn't as expressive as the |
| 111 |
worldwide web format; you can't convert down losslessly. |
| 112 |
|
| 113 |
- There is less maintenance effort put into maintaining the |
| 114 |
secondary non-web format. It requires certain idioms to be |
| 115 |
followed in the HTML source and lists of man pages to be |
| 116 |
separately maintained. This maintenance is essentially done on a |
| 117 |
fault basis -- when someone notices the Unix man pages aren't |
| 118 |
right, he fixes something. |
| 119 |
|
| 120 |
Bear in mind that the person who writes most of the Netpbm |
| 121 |
documentation updates never sees the troff versions; he uses |
| 122 |
Manweb, which renders directly from the HTML. |
| 123 |
|
| 124 |
Also, these methods require manual effort, and technical |
| 125 |
understanding, on your part to set up. Setting it up is too complex |
| 126 |
for an automated process to do it for you with any significant |
| 127 |
integrity. The examples are guidelines and may not work literally |
| 128 |
in your situation. |
| 129 |
|
| 130 |
|
| 131 |
MAKING TROFF MAN PAGES |
| 132 |
---------------------- |
| 133 |
|
| 134 |
1. Start work at the top-level directory of the source package. |
| 135 |
|
| 136 |
2. Download the HTML files using the subversion command. |
| 137 |
The downloaded files will go into "./userguide/". |
| 138 |
|
| 139 |
svn export https://svn.code.sf.net/p/netpbm/code/userguide |
| 140 |
|
| 141 |
3. Create a work directory named "netpbmdoc". The troff man pages, |
| 142 |
as they are converted from HTML pages by the makeman utility, will |
| 143 |
be written here. |
| 144 |
|
| 145 |
mkdir netpbmdoc |
| 146 |
cd netpbmdoc |
| 147 |
make USERGUIDE=../userguide/ -f ../buildtools/manpage.mk manpages |
| 148 |
|
| 149 |
USERGUIDE is the directory containing the input HTML pages. Keep |
| 150 |
it intact until installation is complete. |
| 151 |
|
| 152 |
4. Install the troff man pages, with MANDIR set up appropriately |
| 153 |
to the destination. |
| 154 |
|
| 155 |
MANDIR and MANDIR/{man1,man3,man5} must be existing directories. |
| 156 |
The install step usually requires superuser permissions. |
| 157 |
|
| 158 |
make MANDIR=/usr/local/netpbm/man USERGUIDE=../userguide/ \ |
| 159 |
-f ../buildtools/manpage.mk installman |
| 160 |
cd ../ |
| 161 |
rm -rf netpbmdoc |
| 162 |
|
| 163 |
5. Adjust MANPATH if necessary and try showing one manual page. |
| 164 |
|
| 165 |
man pamflip |
| 166 |
|
| 167 |
|
| 168 |
MAKING CAT PAGES |
| 169 |
---------------- |
| 170 |
|
| 171 |
As with the above example for troff man pages, start at the top-level |
| 172 |
directory of the source package. |
| 173 |
|
| 174 |
svn export https://svn.code.sf.net/p/netpbm/code/userguide |
| 175 |
|
| 176 |
cd ./userguide |
| 177 |
../buildtools/makecat *.html |
| 178 |
|
| 179 |
cp *.1 /usr/man/cat1/ # Usually requires superuser permission |
| 180 |
|
| 181 |
The makecat utility reads files from the current directory and writes |
| 182 |
the results into the same directory. As noted above, it requires lynx |
| 183 |
<http://lynx.invisible-island.net/>. |
| 184 |
|
| 185 |
|
| 186 |
DOCBOOK |
| 187 |
------- |
| 188 |
|
| 189 |
You can turn the Netpbm user manual into Docbook XML pages using Doclifter. |
| 190 |
Because Doclifter works on troff pages, you have to convert the documentation |
| 191 |
down to troff first, which means the Docbook pages are of lower quality than |
| 192 |
the master HTML documentation. |
| 193 |
|
| 194 |
To create Docbook XML, do as follows: |
| 195 |
|
| 196 |
mkdir netpbmdoc |
| 197 |
cd netpbmdoc |
| 198 |
make USERGUIDE=../userguide/ -f ../buildtools/manpage.mk xmlpages |
| 199 |
|
| 200 |
The 'make' executes the HTML to troff conversion step automatically. For the |
| 201 |
troff to XML step, there are problems that have not been completely worked |
| 202 |
out; conversion of several files will fail. |
| 203 |
|
| 204 |
There is no equivalent for 'make installman' for the Docbook XML pages. |