File: edoc_extract.3

package info (click to toggle)
erlang-manpages 1%3A12.b.3-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,188 kB
  • ctags: 2
  • sloc: makefile: 68; perl: 30; sh: 15
file content (186 lines) | stat: -rw-r--r-- 4,498 bytes parent folder | download
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
.TH edoc_extract 3 "edoc  0.7.6" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
edoc_extract \- EDoc documentation extraction\&.
.SH DESCRIPTION
.LP
EDoc documentation extraction\&.

.SH DATA TYPES
.RS 2
.TP 4
.B
\fIedoc_env() = edoc_env() (see module edoc_lib)\fR:

.TP 4
.B
\fIfilename() = filename() (see module file)\fR:

.RE
.SH EXPORTS
.LP
.B
file(File::filename(), Context, Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason}
.br
.RS
.TP
Types
Context = overview | package
.br
Tags = [term()]
.br
Reason = term()
.br
.RE
.RS
.LP
Reads a text file and returns the list of tags in the file\&. Any lines of text before the first tag are ignored\&. \fIEnv\fR is an environment created by edoc_lib:get_doc_env/4\&. Upon error, \fIReason\fR is an atom returned from the call to file:read_file/1\&.
.LP
See text/4 for options\&.
.RE
.LP
.B
header(File::filename(), Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason}
.br
.RS
.TP
Types
Tags = [term()]
.br
Reason = term()
.br
.RE
.RS
.LP
Similar to header/5, but reads the syntax tree and the comments from the specified file\&. 
.LP
\fISee also:\fR header/4, edoc:read_comments/2, edoc:read_source/2\&.
.RE
.LP
.B
header(Forms, File::filename(), Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason}
.br
.RS
.TP
Types
Forms = syntaxTree() | [syntaxTree()]
.br
Tags = [term()]
.br
Reason = term()
.br
.RE
.RS
.LP
Extracts EDoc documentation from commented header file syntax trees\&. Similar to source/5, but ignores any documentation that occurs before a module declaration or a function definition\&. (Warning messages are printed if content may be ignored\&.) \fIEnv\fR is assumed to already be set up with a suitable module context\&. 
.LP
\fISee also:\fR erl_recomment(3), header/5\&.
.RE
.LP
.B
header(Forms, Comments::[comment()], File::filename(), Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason}
.br
.RS
.TP
Types
Forms = syntaxTree() | [syntaxTree()]
.br
Tags = [term()]
.br
Reason = term()
.br
.RE
.RS
.LP
Similar to header/4, but first inserts the given comments in the syntax trees\&. The syntax trees must contain valid position information\&. (Cf\&. edoc:read_comments/2\&.) 
.LP
\fISee also:\fR erl_recomment(3), header/3, header/4\&.
.RE
.LP
.B
source(File::filename(), Env::edoc_env(), Options::proplist()) -> {ModuleName, edoc_module()}
.br
.RS
.TP
Types
ModuleName = atom()
.br
[term()]
.br
.RE
.RS
.LP
Like source/5, but reads the syntax tree and the comments from the specified file\&. 
.LP
\fISee also:\fR source/4, edoc:read_comments/2, edoc:read_source/2\&.
.RE
.LP
.B
source(Forms, File::filename(), Env::edoc_env(), Options::proplist()) -> {ModuleName, edoc_module()}
.br
.RS
.TP
Types
Forms = syntaxTree() | [syntaxTree()]
.br
ModuleName = atom()
.br
edoc_module() (see module edoc)
.br
.RE
.RS
.LP
Extracts EDoc documentation from commented source code syntax trees\&. The given \fIForms\fR must be a single syntax tree of type \fIform_list\fR, or a list of syntax trees representing "program forms" (cf\&. edoc:read_source/2\&. \fIEnv\fR is an environment created by edoc_lib:get_doc_env/4\&. The \fIFile\fR argument is used for error reporting and output file name generation only\&.
.LP
See edoc:get_doc/2 for descriptions of the \fIdef\fR, \fIhidden\fR, \fIprivate\fR, and \fItodo\fR options\&. 
.LP
\fISee also:\fR erl_recomment(3), source/5, edoc:read_comments/2, edoc:read_source/2\&.
.RE
.LP
.B
source(Forms, Comments::[comment()], File::filename(), Env::edoc_env(), Options::proplist()) -> {ModuleName, edoc_module()}
.br
.RS
.TP
Types
Forms = syntaxTree() | [syntaxTree()]
.br
{Line, Column, Indentation, Text}
.br
Line = integer()
.br
Column = integer()
.br
Indentation = integer()
.br
Text = [string()]
.br
ModuleName = atom()
.br
.RE
.RS
.LP
Like source/4, but first inserts the given comments in the syntax trees\&. The syntax trees must contain valid position information\&. (Cf\&. edoc:read_comments/2\&.) 
.LP
\fISee also:\fR erl_recomment(3), source/3, source/4, edoc:read_comments/2, edoc:read_source/2\&.
.RE
.LP
.B
text(Text::string(), Context, Env::edoc_env(), Options::proplist()) -> Tags
.br
.RS
.TP
Types
Context = overview | package
.br
Tags = [term()]
.br
.RE
.RS
.LP
Returns the list of tags in the text\&. Any lines of text before the first tag are ignored\&. \fIEnv\fR is an environment created by edoc_lib:get_doc_env/4\&.
.LP
See source/4 for a description of the \fIdef\fR option\&.
.RE
.SH SEE ALSO
.LP
edoc