Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ba91ca7f
Commit
ba91ca7f
authored
Jun 12, 2000
by
Amos Latteier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More fiddling to make API docs prettier.
parent
095b36dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
lib/python/HelpSys/APIHelpTopic.py
lib/python/HelpSys/APIHelpTopic.py
+11
-5
lib/python/HelpSys/APIHelpView.dtml
lib/python/HelpSys/APIHelpView.dtml
+5
-1
No files found.
lib/python/HelpSys/APIHelpTopic.py
View file @
ba91ca7f
...
...
@@ -104,8 +104,15 @@ class APIHelpTopic(HelpTopic.HelpTopic):
dict
=
{}
execfile
(
file
,
dict
)
self
.
doc
=
dict
.
get
(
'__doc__'
,
''
)
self
.
apis
=
[]
for
v
in
dict
.
values
():
if
type
(
v
)
==
types
.
ClassType
:
self
.
apis
.
append
(
APIDoc
(
v
))
# try to get title from first non-blank line
# of module docstring
if
not
self
.
title
:
# get title from first non-blank line of docstring
lines
=
string
.
split
(
self
.
doc
,
'
\
n
'
)
while
1
:
line
=
string
.
strip
(
lines
[
0
])
...
...
@@ -115,10 +122,9 @@ class APIHelpTopic(HelpTopic.HelpTopic):
lines
.
pop
(
0
)
if
not
lines
:
break
self
.
apis
=
[]
for
v
in
dict
.
values
():
if
type
(
v
)
==
types
.
ClassType
:
self
.
apis
.
append
(
APIDoc
(
v
))
# otherwise get title from first class name
if
not
self
.
title
:
self
.
title
=
self
.
apis
[
0
].
name
index_html
=
HTMLFile
(
'APIHelpView'
,
globals
())
...
...
lib/python/HelpSys/APIHelpView.dtml
View file @
ba91ca7f
<dtml-var standard_html_header>
<h1>API Documentation</h1>
<dtml-if "_.len(apis) > 1">
<dl><dd>
<h2 class="api">
<dtml-in apis>
...
...
@@ -9,10 +11,12 @@
</dtml-in>
</h2>
</dd></dl>
</dtml-if>
<dtml-if doc>
<dtml-var doc fmt="structured-text">
<hr noshade>
</dtml-if>
<dtml-in apis>
<dtml-var view>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment