~ubuntu-branches/ubuntu/karmic/eric/karmic

« back to all changes in this revision

Viewing changes to eric/README-eric4-doc.txt

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2008-01-28 18:02:25 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080128180225-6nrox6yrworh2c4v
Tags: 4.0.4-1ubuntu1
* Add python-qt3 to build-depends becuase that's where Ubuntu puts 
  pyqtconfig
* Change maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
README for the eric4-doc documentation generator
 
2
 
 
3
    eric4-doc is the documentation generator of the eric4 IDE. Python source
 
4
    code documentation may be included as ordinary Python doc-strings or as 
 
5
    documentation comments. For Quixote Template files (PTL) only documentation 
 
6
    comments are available due to the inner workings of Quixote. Documentation 
 
7
    comments start with the string ###, followed by the contents and ended by 
 
8
    ###. Every line of the documentation comments contents must start with a # 
 
9
    (see example below).
 
10
    
 
11
    For Ruby files, the documentation string must be started with "=begin edoc"
 
12
    and must be ended with "=end". The documentation string for classes, modules
 
13
    and functions/methods must follow their defininition.
 
14
    
 
15
    Documentation for packages (i.e. directories) must be in a file called 
 
16
    __init__.py or __init__.rb. If a package directory doesn't contain a file
 
17
    like these, documentation for files in this directory is suppressed.
 
18
    
 
19
    The documentation consist of two parts. The first part is the description of 
 
20
    the module, class, function or method. The second part, separated from the 
 
21
    first by a blank line, consists of one or more tags. These are described below.
 
22
    
 
23
    eric4-doc produces HTML files from the documentation found within the source 
 
24
    files scaned. It understands the following commandline parameters next to others.
 
25
    
 
26
    -o directory
 
27
      Generate files in the named directory.
 
28
    
 
29
    -R, -r
 
30
      Perform a recursive search for Python files.
 
31
    
 
32
    -x directory
 
33
      Specify a directory basename to be excluded. This option may be repeated
 
34
      multiple times.
 
35
    
 
36
    -i
 
37
      Don't generate index files.
 
38
    
 
39
    Just type "eric4-doc" to get some usage information.
 
40
    
 
41
    Description
 
42
    -----------
 
43
    The descriptions are HTML fragments and may contain most standard HTML. The
 
44
    description text is included in the output wrapped in P tags, but unchanged 
 
45
    otherwise. Paragraphs have to be separated by a blank line. In order to
 
46
    generate a blank line in the output enter a line that contains a single dot
 
47
    (.). Reserved HTML entities (<, > and &) and the at-sign (@) at the beginning 
 
48
    of a line, if that line doesn't contain a tag (see below), must be properly 
 
49
    escaped. "<" should be written as "&lt;", ">" as "&gt;", "&" as "&amp;" and
 
50
    "@" should be escaped as "@@".
 
51
    
 
52
    The documentation string or documentation comment may contain block tags
 
53
    and inline tags. Inline tags are denoted by curly braces and can be placed
 
54
    anywhere in the main description or in the description part of block tags.
 
55
    Block tags can only be placed in the tag section that follows the main
 
56
    description. Block tags are indicated by an at-sign (@) at the beginning of
 
57
    the line. The text before the first tag is the description of a module, class,
 
58
    method or function.
 
59
    
 
60
    Python Docstring:
 
61
        """
 
62
        This is sentence one, which gets included as a short description.
 
63
        All additional sentences are included into the full description.
 
64
        
 
65
        @param param1 first parameter
 
66
        @exception ValueError list entry wasn't found
 
67
        @return flag indicating success
 
68
        """
 
69
        
 
70
    Python/Quixote Documentation comment:
 
71
        ###
 
72
        # This is line one, which gets included as a short description.
 
73
        # All additional lines are included into the full description.
 
74
        #
 
75
        # @param param1 first parameter
 
76
        # @exception ValueError list entry wasn't found
 
77
        # @return flag indicating success
 
78
        ###
 
79
        
 
80
    Ruby Docstring:
 
81
        =begin edoc
 
82
        This is line one, which gets included as a short description.
 
83
        All additional lines are included into the full description.
 
84
        
 
85
        @param param1 first parameter
 
86
        @exception ValueError list entry wasn't found
 
87
        @return flag indicating success
 
88
        =end
 
89
 
 
90
    Block Tags
 
91
    ----------
 
92
    The block tags recogized by eric4-doc are:
 
93
 
 
94
    @@
 
95
        This isn't really a tag. This is used to escape an at sign at the beginning
 
96
        of a line. Everything after the first @ is copied verbatim to the output.
 
97
 
 
98
    @author author
 
99
        This tag is used to name the author of the code. For example:
 
100
        @author Detlev Offenbach <detlev@die-offenbachs.de>
 
101
 
 
102
    @deprecated description
 
103
        This tag is used to mark a function or method as deprecated. It is always 
 
104
        followed by one or more lines of descriptive text.
 
105
 
 
106
    @event eventname description
 
107
        This tag is used to describe the events (PyQt) a class may emit. It is 
 
108
        always followed by the event name and one or more lines of descriptive 
 
109
        text. For example:
 
110
        
 
111
        @event closeEvent Emitted when an editor window is closed.
 
112
    
 
113
    @exception exception description
 
114
        These tags are used to describe the exceptions a function or method may 
 
115
        raise. It is always followed by the exception name and one or more lines 
 
116
        of descriptive text. For example:
 
117
        
 
118
        @exception ValueError The searched value is not contained in the list.
 
119
    
 
120
    @keyparam name description
 
121
        This tag is like the @param tag, but should be used for parameters, that 
 
122
        should always be given as keyword parameters. It is always followed by 
 
123
        the argument name and one or more lines of descriptive text. For example:
 
124
        
 
125
        @keyparam extension Optional extension of the source file.
 
126
    
 
127
    @param name description
 
128
        This tag is used to describe a function or method argument. It is always 
 
129
        followed by the argument name and one or more lines of descriptive text.
 
130
        For example:
 
131
        
 
132
        @param filename Name of the source file.
 
133
    
 
134
    @raise exception description
 
135
        This tag is an alias for the @exception tag.
 
136
 
 
137
    @return description
 
138
        This tag is used to describe a functions or methods return value. It can 
 
139
        include one or more lines of descriptive text. For example:
 
140
        
 
141
        @return list of description strings
 
142
    
 
143
    @see reference
 
144
        This tag is used to include a reference in the documentation. It comes in
 
145
        three different forms.
 
146
 
 
147
        @see "string"
 
148
            Adds a text entry of string. No link is generated. eric4-doc distinguishes
 
149
            this form from the others by looking for a double-quote (") as the first
 
150
            character. For example:
 
151
 
 
152
            @see "eric4-doc readme file"
 
153
 
 
154
        @see <a href="URL#value">label</a>
 
155
            Adds a link as defined by URL#value. eric4-doc distinguishes this form from
 
156
            the others by looking for a less-than symbol (<) as the first character.
 
157
            For example:
 
158
 
 
159
            @see <a href="eric4.eric4-doc.html>eric4-doc documentation generator</a>
 
160
 
 
161
        @see package.module#member label
 
162
            Adds a link to "member" in "module" in "package". package can be a package
 
163
            path, where the package names are separated by a dot character (.). The
 
164
            "package.module#member" part must not be split over several lines and
 
165
            must name a valid target within the documentation directory. For example:
 
166
 
 
167
            @see eric4.eric4-doc#main eric4-doc main() function
 
168
            @see eric4.DocumentationTools.ModuleDocumentor#ModuleDocument.__genModuleSection
 
169
                ModuleDocument.__genModuleSection
 
170
 
 
171
    @signal signalname description
 
172
        This tag is used to describe the signals (PyQt) a class may emit. It is 
 
173
        always followed by the signal name and one or more lines of descriptive 
 
174
        text. For example:
 
175
        
 
176
        @signal lastEditorClosed Emitted after the last editor window was 
 
177
            closed.
 
178
    
 
179
    @throws exception description
 
180
        This tag is an alias for the @exception tag.
 
181
 
 
182
    Inline Tags
 
183
    -----------
 
184
    The inline tags recogized by eric4-doc are:
 
185
 
 
186
    {@link package.module#member label}
 
187
        Inserts an in-line link with visible text label that points to the documentation
 
188
        given in the reference. This tag works he same way as the @see block tag of this
 
189
        form.