]> git.cameronkatri.com Git - mandoc.git/blob - demandoc.1
Make `-w' mode work much better. This is INCREDIBLY poorly specified in
[mandoc.git] / demandoc.1
1 .\" $Id: demandoc.1,v 1.3 2011/09/01 22:09:50 kristaps Exp $
2 .\"
3 .\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4 .\"
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
8 .\"
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .\"
17 .Dd $Mdocdate: September 1 2011 $
18 .Dt DEMANDOC 1
19 .Os
20 .Sh NAME
21 .Nm demandoc
22 .Nd emit only text of UNIX manuals
23 .Sh SYNOPSIS
24 .Nm demandoc
25 .Op Fl w
26 .Op Ar
27 .Sh DESCRIPTION
28 The
29 .Nm
30 utility emits only the text portions of well-formed
31 .Xr mdoc 7
32 and
33 .Xr man 7
34 .Ux
35 manual files.
36 Its arguments are as follows:
37 .Bl -tag -width Ds
38 .It Fl w
39 Output a word list.
40 This outputs each word of text on its own line.
41 A
42 .Qq word ,
43 in this case, refers to whitespace-delimited terms beginning with at
44 least two letters after opening punctuation and not consisting of any
45 escape sequences.
46 .It Ar
47 The input files.
48 .El
49 .Pp
50 If
51 .Ar file
52 is not provided,
53 .Nm
54 accepts standard input.
55 If a document is not well-formed, it is skipped.
56 .Pp
57 By default,
58 .Nm
59 parses its input and outputs only text nodes, preserving line column
60 position.
61 Escape sequences are omitted from the output.
62 .Pp
63 The
64 .Fl i ,
65 .Fl k ,
66 .Fl m ,
67 and
68 .Fl p
69 flags are silently discarded for calling compatibility with the
70 historical deroff.
71 .Sh EXIT STATUS
72 The
73 .Nm
74 utility exits with one of the following values:
75 .Pp
76 .Bl -tag -width Ds -compact
77 .It 0
78 No errors occurred.
79 .It 6
80 An operating system error occurred, for example memory exhaustion or an
81 error accessing input files.
82 Such errors cause
83 .Nm
84 to exit at once, possibly in the middle of parsing or formatting a file.
85 The output databases are corrupt and should be removed .
86 .El
87 .Sh SEE ALSO
88 .Xr mandoc 1 ,
89 .Xr man 7
90 .Xr mdoc 7
91 .Sh HISTORY
92 .Nm
93 replaces the historical deroff utility for handling modern
94 .Xr man 7
95 and
96 .Xr mdoc 7
97 documents.
98 .Sh AUTHORS
99 The
100 .Nm
101 utility was written by
102 .An Kristaps Dzonsons ,
103 .Mt kristaps@bsd.lv .