1*9ff1f2acSchristos.\" Id: demandoc.1,v 1.8 2014/09/12 00:10:26 schwarze Exp 2c5f73b34Sjoerg.\" 3c5f73b34Sjoerg.\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> 4c5f73b34Sjoerg.\" 5c5f73b34Sjoerg.\" Permission to use, copy, modify, and distribute this software for any 6c5f73b34Sjoerg.\" purpose with or without fee is hereby granted, provided that the above 7c5f73b34Sjoerg.\" copyright notice and this permission notice appear in all copies. 8c5f73b34Sjoerg.\" 9c5f73b34Sjoerg.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10c5f73b34Sjoerg.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11c5f73b34Sjoerg.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12c5f73b34Sjoerg.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13c5f73b34Sjoerg.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14c5f73b34Sjoerg.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15c5f73b34Sjoerg.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16c5f73b34Sjoerg.\" 17*9ff1f2acSchristos.Dd September 12, 2014 18c5f73b34Sjoerg.Dt DEMANDOC 1 19c5f73b34Sjoerg.Os 20c5f73b34Sjoerg.Sh NAME 21c5f73b34Sjoerg.Nm demandoc 22c5f73b34Sjoerg.Nd emit only text of UNIX manuals 23c5f73b34Sjoerg.Sh SYNOPSIS 24c5f73b34Sjoerg.Nm demandoc 25c5f73b34Sjoerg.Op Fl w 26c5f73b34Sjoerg.Op Ar 27c5f73b34Sjoerg.Sh DESCRIPTION 28c5f73b34SjoergThe 29c5f73b34Sjoerg.Nm 30c5f73b34Sjoergutility emits only the text portions of well-formed 31c5f73b34Sjoerg.Xr mdoc 7 32c5f73b34Sjoergand 33c5f73b34Sjoerg.Xr man 7 34c5f73b34Sjoerg.Ux 35c5f73b34Sjoergmanual files. 36cf816816Sjoerg.Pp 37cf816816SjoergBy default, 38cf816816Sjoerg.Nm 39cf816816Sjoergparses standard input and outputs only text nodes, preserving line 40cf816816Sjoergand column position. 41cf816816SjoergEscape sequences are omitted from the output. 42cf816816Sjoerg.Pp 43c5f73b34SjoergIts arguments are as follows: 44c5f73b34Sjoerg.Bl -tag -width Ds 45c5f73b34Sjoerg.It Fl w 46c5f73b34SjoergOutput a word list. 47c5f73b34SjoergThis outputs each word of text on its own line. 48c5f73b34SjoergA 49c5f73b34Sjoerg.Qq word , 50c5f73b34Sjoergin this case, refers to whitespace-delimited terms beginning with at 51c5f73b34Sjoergleast two letters and not consisting of any escape sequences. 52c5f73b34SjoergWords have their leading and trailing punctuation 53c5f73b34Sjoerg.Pq double-quotes, sentence punctuation, etc. 54c5f73b34Sjoergstripped. 55c5f73b34Sjoerg.It Ar 56c5f73b34SjoergThe input files. 57c5f73b34Sjoerg.El 58c5f73b34Sjoerg.Pp 59c5f73b34SjoergIf a document is not well-formed, it is skipped. 60c5f73b34Sjoerg.Pp 61c5f73b34SjoergThe 62c5f73b34Sjoerg.Fl i , 63c5f73b34Sjoerg.Fl k , 64c5f73b34Sjoerg.Fl m , 65c5f73b34Sjoergand 66c5f73b34Sjoerg.Fl p 67c5f73b34Sjoergflags are silently discarded for calling compatibility with the 68c5f73b34Sjoerghistorical deroff. 69c5f73b34Sjoerg.Sh EXIT STATUS 70c5f73b34SjoergThe 71c5f73b34Sjoerg.Nm 72c5f73b34Sjoergutility exits with one of the following values: 73c5f73b34Sjoerg.Pp 74c5f73b34Sjoerg.Bl -tag -width Ds -compact 75c5f73b34Sjoerg.It 0 76c5f73b34SjoergNo errors occurred. 77c5f73b34Sjoerg.It 6 78c5f73b34SjoergAn operating system error occurred, for example memory exhaustion or an 79c5f73b34Sjoergerror accessing input files. 80c5f73b34SjoergSuch errors cause 81c5f73b34Sjoerg.Nm 82c5f73b34Sjoergto exit at once, possibly in the middle of parsing or formatting a file. 83c5f73b34SjoergThe output databases are corrupt and should be removed . 84c5f73b34Sjoerg.El 85c5f73b34Sjoerg.Sh EXAMPLES 86c5f73b34SjoergThe traditional usage of 87c5f73b34Sjoerg.Nm 88c5f73b34Sjoergis for spell-checking manuals on 89c5f73b34Sjoerg.Bx . 90c5f73b34SjoergThis is accomplished as follows (assuming British spelling): 91c5f73b34Sjoerg.Pp 92c5f73b34Sjoerg.Dl $ demandoc -w file.1 | spell -b 93c5f73b34Sjoerg.Sh SEE ALSO 94c5f73b34Sjoerg.Xr mandoc 1 , 95fec65c98Schristos.Xr man 7 , 96c5f73b34Sjoerg.Xr mdoc 7 97c5f73b34Sjoerg.Sh HISTORY 98c5f73b34Sjoerg.Nm 99c5f73b34Sjoergreplaces the historical deroff utility for handling modern 100c5f73b34Sjoerg.Xr man 7 101c5f73b34Sjoergand 102c5f73b34Sjoerg.Xr mdoc 7 103c5f73b34Sjoergdocuments. 104c5f73b34Sjoerg.Sh AUTHORS 105c5f73b34SjoergThe 106c5f73b34Sjoerg.Nm 107c5f73b34Sjoergutility was written by 10870f041f9Sjoerg.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv . 109