summaryrefslogtreecommitdiff
path: root/lib/stdlib/doc/src/shell_docs.xml
blob: bd3e3600f72f1ff11f773eadb448a13838e1de69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2020</year><year>2020</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

    </legalnotice>

    <title>shell_docs</title>
    <prepared>Lukas Larsson</prepared>
    <responsible></responsible>
    <docno>1</docno>
    <approved></approved>
    <checked></checked>
    <date>2020-02-19</date>
    <rev>A</rev>
    <file>shell_docs.xml</file>
  </header>
  <module since="OTP 23.0">shell_docs</module>
  <modulesummary>Functions used to render EEP-48 style documentation for a shell.</modulesummary>
  <description>
    <p>This module can be used to render function and type documentation
      to be printed in a shell. It can only render EEP-48 documentation of the format
      <c>application/erlang+html</c>. For more information about this format see
      <seeguide marker="erl_docgen:doc_storage">Documentation Storage</seeguide>
      in Erl_Docgen's User's Guide.
    </p>
  </description>

  <datatypes>
    <datatype>
      <name name="docs_v1"/>
      <desc>
        <p>
          The record holding EEP-48 documentation for a module.
          You can use <seemfa marker="kernel:code#get_doc/1">code:get_doc/1</seemfa>
          to fetch this information from a module.
        </p>
      </desc>
    </datatype>
    <datatype>
      <name name="config"/>
      <desc>
        <p>
          The configuration of how the documentation should be rendered.
        </p>
        <taglist>
          <tag>encoding</tag>
          <item>
            Configure the encoding that should be used by
            the renderer for graphical details such as bullet-points.
            By default <c>shell_docs</c> uses the value returned
          by <seemfa marker="io#getopts/0"><c>io:getopts()</c></seemfa>.</item>
          <tag>ansi</tag>
          <item>
            Configure whether <url href="https://en.wikipedia.org/wiki/ANSI_escape_code">
            ansi escape codes</url> should be used to
            render graphical details such as bold and underscore. By default
            <c>shell_docs</c> will try to determine if the receiving shell
            supports ansi escape codes. It is possible to override
            the automated check by setting the kernel configuration parameter
          <c>shell_docs_ansi</c> to a <c>boolean()</c> value.</item>
          <tag>columns</tag>
          <item>
            Configure how wide the target documentation should be rendered.
            By default <c>shell_docs</c> used the value returned by
            <seemfa marker="io#columns/0"><c>io:columns()</c></seemfa>.
          </item>
        </taglist>
      </desc>
    </datatype>
    <datatype>
      <name name="chunk_element_block_type"/>
      <name name="chunk_element_inline_type"/>
      <name name="chunk_element_type"/>
      <desc>
        <p>
          The HTML tags allowed in <c>application/erlang+html</c>.
        </p>
      </desc>
    </datatype>
    <datatype>
      <name name="chunk_element_attr"/>
      <name name="chunk_element_attrs"/>
      <name name="chunk_element"/>
      <name name="chunk_elements"/>
      <desc>
      </desc>
    </datatype>
  </datatypes>

  <funcs>

    <func>
      <name name="render" arity="2" since="OTP 23.0"/>
      <name name="render" arity="3" clause_i="1" since="OTP 23.2"/>
      <name name="render" arity="3" clause_i="2" since="OTP 23.0"/>
      <name name="render" arity="4" clause_i="1" since="OTP 23.2"/>
      <name name="render" arity="4" clause_i="2" since="OTP 23.0"/>
      <name name="render" arity="5" since="OTP 23.2"/>
      <fsummary>Render the documentation for a module or function.</fsummary>
      <desc>
        <p>Render the documentation for a module or function.</p>
      </desc>
    </func>
    <func>
      <name name="render_type" arity="2" since="OTP 23.0"/>
      <name name="render_type" arity="3" clause_i="1" since="OTP 23.2"/>
      <name name="render_type" arity="3" clause_i="2" since="OTP 23.0"/>
      <name name="render_type" arity="4" clause_i="1" since="OTP 23.2"/>
      <name name="render_type" arity="4" clause_i="2" since="OTP 23.0"/>
      <name name="render_type" arity="5" since="OTP 23.2"/>
      <fsummary>Render the documentation of a type in a module.</fsummary>
      <desc>
        <p>Render the documentation of a type in a module.</p>
      </desc>
    </func>
    <func>
      <name name="render_callback" arity="2" since="OTP 23.0"/>
      <name name="render_callback" arity="3" clause_i="1" since="OTP 23.2"/>
      <name name="render_callback" arity="3" clause_i="2" since="OTP 23.0"/>
      <name name="render_callback" arity="4" clause_i="1" since="OTP 23.2"/>
      <name name="render_callback" arity="4" clause_i="2" since="OTP 23.0"/>
      <name name="render_callback" arity="5" since="OTP 23.2"/>
      <fsummary>Render the documentation of a callback in a module.</fsummary>
      <desc>
        <p>Render the documentation of a callback in a module.</p>
      </desc>
    </func>

    <func>
      <name name="validate" arity="1" since="OTP 23.0"/>
      <fsummary>Validate the documentation</fsummary>
      <desc>
        <p>This function can be used to do a basic validation of
          the doc content of <c>application/erlang+html</c> format.</p>
      </desc>
    </func>

    <func>
      <name name="normalize" arity="1" since="OTP 23.0"/>
      <fsummary>Normalize the documentation</fsummary>
      <desc>
        <p>This function can be used to do whitespace normalization
          of <c>application/erlang+html</c> documentation.</p>
      </desc>
    </func>

  </funcs>
</erlref>