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
c6c3623c
Commit
c6c3623c
authored
Dec 02, 1998
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added deferred__init__, bug and formatting fixes.
parent
d61daf3c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
43 deletions
+49
-43
lib/python/HelpSys/HelpSys.py
lib/python/HelpSys/HelpSys.py
+14
-9
lib/python/HelpSys/HelpUtil.py
lib/python/HelpSys/HelpUtil.py
+14
-2
lib/python/HelpSys/helpsys_index.dtml
lib/python/HelpSys/helpsys_index.dtml
+12
-23
lib/python/HelpSys/objectitem_index.dtml
lib/python/HelpSys/objectitem_index.dtml
+9
-9
No files found.
lib/python/HelpSys/HelpSys.py
View file @
c6c3623c
"""Help system and documentation support"""
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
ts_regex
import
Globals
,
Acquisition
from
HelpUtil
import
classobject
,
methodobject
,
is_class
,
is_module
from
App.Dialogs
import
MessageDialog
import
Globals
,
Acquisition
,
StructuredText
from
HelpUtil
import
classobject
,
is_class
,
is_module
from
ImageFile
import
ImageFile
from
StructuredText
import
HTML
from
Globals
import
HTMLFile
...
...
@@ -61,11 +59,14 @@ class ObjectItem(classobject):
class
ObjectRef
(
Acquisition
.
Implicit
):
"""Object reference"""
__names__
=
None
__roles__
=
None
index_html
=
HTMLFile
(
'objectref_index'
,
globals
())
def
__init__
(
self
):
def
deferred__init__
(
self
):
# This is necessary because we want to wait until all
# products have been installed (imported).
dict
=
{}
for
k
,
v
in
sys
.
modules
.
items
():
if
v
is
not
None
and
k
!=
'__builtins__'
:
...
...
@@ -74,19 +75,23 @@ class ObjectRef(Acquisition.Implicit):
keys
.
sort
()
for
key
in
keys
:
setattr
(
self
,
key
,
dict
[
key
])
self
.
_
ids
_
=
keys
self
.
_
_names_
_
=
keys
objectValues__roles__
=
None
def
objectValues
(
self
):
if
self
.
__names__
is
None
:
self
.
deferred__init__
()
items
=
[]
for
id
in
self
.
_
ids
_
:
for
id
in
self
.
_
_names_
_
:
items
.
append
(
getattr
(
self
,
id
))
return
items
def
search_mod
(
self
,
mod
,
dict
):
hidden
=
(
'Control Panel'
,
'Principia Draft'
,
'simple item'
)
for
k
,
v
in
mod
.
__dict__
.
items
():
if
is_class
(
v
)
and
hasattr
(
v
,
'meta_type'
)
and
\
hasattr
(
v
,
'__ac_permissions__'
):
hasattr
(
v
,
'__ac_permissions__'
)
and
\
(
v
.
meta_type
not
in
hidden
):
dict
[
v
.
meta_type
]
=
ObjectItem
(
k
,
v
)
if
is_module
(
v
)
and
hasattr
(
v
,
'__path__'
):
dict
=
self
.
search_mod
(
v
,
dict
)
...
...
lib/python/HelpSys/HelpUtil.py
View file @
c6c3623c
"""Help system and documentation support"""
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
import
Globals
,
Acquisition
import
StructuredText.StructuredText
import
sys
,
os
,
string
,
ts_regex
from
StructuredText
import
HTML
stx_class
=
StructuredText
.
StructuredText
.
HTML
class
object
(
Acquisition
.
Implicit
):
...
...
@@ -41,6 +42,16 @@ class object(Acquisition.Implicit):
return
doc
return
''
def
get_docstring_html
(
self
):
doc
=
self
.
get_docstring
()
if
string
.
find
(
doc
,
'
\
n
\
n
'
)
>
-
1
:
doc
=
string
.
split
(
doc
,
'
\
n
\
n
'
)
if
len
(
doc
)
>
1
:
doc
[
1
]
=
string
.
strip
(
doc
[
1
])
doc
=
string
.
join
(
doc
,
'
\
n
\
n
'
)
return
str
(
stx_class
(
doc
))
def
version
(
self
):
if
hasattr
(
self
.
_obj_
,
'__version__'
):
return
self
.
_obj_
.
__version__
...
...
@@ -177,6 +188,7 @@ pre_match=ts_regex.compile('[A-Za-z0-9_]*([^)]*)[ -]*').match
sig_match
=
ts_regex
.
compile
(
'[A-Za-z0-9_]*([^)]*)'
).
match
class
methodobject
(
object
):
def
get_class
(
self
):
return
self
.
_obp_
...
...
lib/python/HelpSys/helpsys_index.dtml
View file @
c6c3623c
...
...
@@ -6,34 +6,25 @@ ZOPE Help
</head>
<body
bgcolor=
"#ffffff"
link=
"#000099"
vlink=
"#555555"
>
<h2>
Z
OPE
Help
</h2>
<h2>
Z
ope
Help
</h2>
<p>
The ZOPE online help system provides programming documentation
as well as links to in-depth product guides, mailing lists and
other resources.
The Zope online help system provides links to in-depth product guides,
programming references and other resources.
</p>
<h3>
General Documentation
</h3>
<p>
General documentation includes documentation for the use and
management of built-in and add-on products, as well as an
extensive DTML manual.
General documentation for the use and management of built-in and
add-on products, as well as an extensive DTML manual are available
on the Zope website at
<a
href=
"http://www.zope.org"
target=
"_top"
>
http://www.zope.org
</a>
.
</p>
<ul>
<li>
<a
href=
""
>
ZOPE Manager's Guide
</a>
<li>
<a
href=
""
>
DTML manual
</a>
</ul>
<h3>
Programming References
</h3>
<p>
Z
OPE
provides an online object reference that documents the
Z
ope
provides an online object reference that documents the
services provided by high-level objects such as Documents
and Folders. Other references will be added soon.
</p>
...
...
@@ -47,12 +38,10 @@ and Folders. Other references will be added soon.
<h3>
Other Resources
</h3>
<p>
Online resources include the
<a
href=
"http://www.zope.org/"
>
ZOPE website
</a>
and the
<a
href=
"mailto:zope@zope.org"
>
ZOPE mailing list
</a>
. You can subscribe to the mailing
list by sending an email to
<a
href=
"mailto:zope-request@zope.org"
>
zope-request@zope.org
</a>
and including the word
"
subscribe
"
in the subject line.
One of the best resources available is the
<a
href=
"mailto:zope@zope.org"
>
Zope mailing list
</a>
. You can subscribe to the mailing list by sending an
email to
<a
href=
"mailto:zope-request@zope.org"
>
zope-request@zope.org
</a>
and including the word
"
subscribe
"
in the subject line.
</p>
...
...
lib/python/HelpSys/objectitem_index.dtml
View file @
c6c3623c
...
...
@@ -14,11 +14,10 @@ Object Reference
<h3>
<!--#if icon-->
<img
src=
"<!--#var SCRIPT_NAME-->/<!--#var icon-->"
height=
"16"
width=
"16"
alt=
""
>
<!--#endif-->
<!--#var meta_type-->
</h3>
<p>
<code>
<!--#var get_docstring-->
<!--#var get_docstring
_html
-->
</code>
</p>
<h3>
<!--#var meta_type-->
methods
</h3>
...
...
@@ -56,14 +55,15 @@ Object Reference
</code>
</dt>
<dd><code>
<!--#if permission-->
<!--#if permission-->
<strong>
Permission:
</strong>
<!--#var permission-->
<br><br>
<!--#endif-->
<!--#endif-->
<!--#if get_docstring--><!--#var get_docstring--><!--#
else-->
No documentation for this method
<!--#
endif-->
<br>
<!--#if get_docstring_html-->
<!--#var get_docstring_html-->
<!--#else-->
<p>
No documentation for this method
</p>
<!--#endif-->
<a
href=
"#top"
><img
src=
"<!--#var SCRIPT_NAME-->/HelpSys/u_arrow"
height=
"9"
width=
"9"
border=
"0"
valign=
"bottom"
alt=
""
>
top
</a><br><br>
</code>
</dd>
...
...
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