logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

demandoc.1 (2707B)


  1. .\" $Id: demandoc.1,v 1.8 2014/09/12 00:10:26 schwarze 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 12 2014 $
  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. .Pp
  37. By default,
  38. .Nm
  39. parses standard input and outputs only text nodes, preserving line
  40. and column position.
  41. Escape sequences are omitted from the output.
  42. .Pp
  43. Its arguments are as follows:
  44. .Bl -tag -width Ds
  45. .It Fl w
  46. Output a word list.
  47. This outputs each word of text on its own line.
  48. A
  49. .Qq word ,
  50. in this case, refers to whitespace-delimited terms beginning with at
  51. least two letters and not consisting of any escape sequences.
  52. Words have their leading and trailing punctuation
  53. .Pq double-quotes, sentence punctuation, etc.
  54. stripped.
  55. .It Ar
  56. The input files.
  57. .El
  58. .Pp
  59. If a document is not well-formed, it is skipped.
  60. .Pp
  61. The
  62. .Fl i ,
  63. .Fl k ,
  64. .Fl m ,
  65. and
  66. .Fl p
  67. flags are silently discarded for calling compatibility with the
  68. historical deroff.
  69. .Sh EXIT STATUS
  70. The
  71. .Nm
  72. utility exits with one of the following values:
  73. .Pp
  74. .Bl -tag -width Ds -compact
  75. .It 0
  76. No errors occurred.
  77. .It 6
  78. An operating system error occurred, for example memory exhaustion or an
  79. error accessing input files.
  80. Such errors cause
  81. .Nm
  82. to exit at once, possibly in the middle of parsing or formatting a file.
  83. The output databases are corrupt and should be removed .
  84. .El
  85. .Sh EXAMPLES
  86. The traditional usage of
  87. .Nm
  88. is for spell-checking manuals on
  89. .Bx .
  90. This is accomplished as follows (assuming British spelling):
  91. .Pp
  92. .Dl $ demandoc -w file.1 | spell -b
  93. .Sh SEE ALSO
  94. .Xr mandoc 1 ,
  95. .Xr man 7 ,
  96. .Xr mdoc 7
  97. .Sh HISTORY
  98. .Nm
  99. replaces the historical deroff utility for handling modern
  100. .Xr man 7
  101. and
  102. .Xr mdoc 7
  103. documents.
  104. .Sh AUTHORS
  105. The
  106. .Nm
  107. utility was written by
  108. .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .