]> git.cameronkatri.com Git - mandoc.git/blob - demandoc.1
Break schwarze@'s release notes into sections. Ok schwarze@.
[mandoc.git] / demandoc.1
1 .\" $Id: demandoc.1,v 1.5 2011/09/02 13:04:05 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 2 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 and not consisting of any escape sequences.
45 Words have their leading and trailing punctuation
46 .Pq double-quotes, sentence punctuation, etc.
47 stripped.
48 .It Ar
49 The input files.
50 .El
51 .Pp
52 If
53 .Ar file
54 is not provided,
55 .Nm
56 accepts standard input.
57 If a document is not well-formed, it is skipped.
58 .Pp
59 By default,
60 .Nm
61 parses its input and outputs only text nodes, preserving line column
62 position.
63 Escape sequences are omitted from the output.
64 .Pp
65 The
66 .Fl i ,
67 .Fl k ,
68 .Fl m ,
69 and
70 .Fl p
71 flags are silently discarded for calling compatibility with the
72 historical deroff.
73 .Sh EXIT STATUS
74 The
75 .Nm
76 utility exits with one of the following values:
77 .Pp
78 .Bl -tag -width Ds -compact
79 .It 0
80 No errors occurred.
81 .It 6
82 An operating system error occurred, for example memory exhaustion or an
83 error accessing input files.
84 Such errors cause
85 .Nm
86 to exit at once, possibly in the middle of parsing or formatting a file.
87 The output databases are corrupt and should be removed .
88 .El
89 .Sh EXAMPLES
90 The traditional usage of
91 .Nm
92 is for spell-checking manuals on
93 .Bx .
94 This is accomplished as follows (assuming British spelling):
95 .Pp
96 .Dl $ demandoc -w file.1 | spell -b
97 .Sh SEE ALSO
98 .Xr mandoc 1 ,
99 .Xr man 7
100 .Xr mdoc 7
101 .Sh HISTORY
102 .Nm
103 replaces the historical deroff utility for handling modern
104 .Xr man 7
105 and
106 .Xr mdoc 7
107 documents.
108 .Sh AUTHORS
109 The
110 .Nm
111 utility was written by
112 .An Kristaps Dzonsons ,
113 .Mt kristaps@bsd.lv .