[Zope-Checkins] CVS: Zope2 - Context.py:1.1.2.1 Developer.stx:1.1.2.1 Util.py:1.1.2.1 Help.stx:1.1.2.2 __init__.py:1.1.2.2

Michel Pelletier michel@digicool.com
Thu, 17 May 2001 18:15:26 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/HelpSys/help
In directory korak.digicool.com:/tmp/cvs-serv16954

Modified Files:
      Tag: APIDocs-branch
	Help.stx __init__.py 
Added Files:
      Tag: APIDocs-branch
	Context.py Developer.stx Util.py 
Log Message:
more help sys content


--- Added File Context.py in package Zope2 ---
from Interface import Base

class HelpContext(Base):
    """
    Provides a registration context for framework documentation.
    """

    def registerHelp(self, package):

        """ Register the path to a package that needs to be imported
        at a later time into the help system.  This is used by
        non-product frameworks.  The path to 'package' defines the
        location of your frameworks help python package.  This package
        will be imported immediately after Product initialization at
        Zope start-up time.  """

--- Added File Developer.stx in package Zope2 ---
Help System for Developers

  The help system provides two different ways for developers to
  register help for their software:

    Product Registration -- Products can register help specificly for
    the components they provide.

    Framework Registration -- Non-products can register their
    documentation at import time.  This is used for internal Zope
    "frameworks" like ZODB, StructuredText, and other services not
    provided by products.

  Although any software, including products, can use the framework
  registration, it is recommended that Product authors use the product
  registration method of registering help.  This method is described
  in the following online document, <a
  href="http://www.zope.org/DocProjects/zope_product">Documenting Your
  Zope Product.</a>

  Framework documentation authors should go about the same procedure
  for documenting a framework as product authors.  The only difference
  lies in the way you register help for non-products.  In order to
  register framework documentation, you must call the
  "HelpContext":Context.py interface at some point when your framework
  is imported by Zope.  

  When your framework is imported, Zope registers your help package
  but does not import it.  Zope waits until just *after* product
  registration happens during a normal Zope startup.  At this time,
  Zope goes through and imports all of the registered framework
  documentation packages into the Zope help system object.

  Notes:

    Post product registration time is the *only* time the
    "HelpContext":Context.py registration gets run.  Calls to
    HelpContext after that will have no effect.  This will be fixed.

    "HelpContext":Context.py needs to be a much, much lower level
    interface to avoid import dependencies.  Currently it lives in
    HelpSys, which prevents low level frameworks like ZODB and ZServer
    from registering help without hackery.

--- Added File Util.py in package Zope2 ---

from Interface import Base

class Util(Base):
    """
    Provide product registration utilities.  A module, not a class,
    currently implements this interface.
    """

    def makeHelp(self, id, path, file, context, permissions=None, categories=None):
        """
        Make a new help topic based on the file extension, and register that
        help topic with the 'context' product context.  This method
        should be called from the 'initialize' method in Products.
        """

    def lazySetup(self, path, product_help, categories=None):
        """
        Call with a path to a directory containing help files.  These
        files will be turned into help topics and placed in the
        ObjectManager 'product_help'.  Default categories can be
        provided."""

--- Updated File Help.stx in package Zope2 --
--- Help.stx	2001/05/17 15:59:43	1.1.2.1
+++ Help.stx	2001/05/17 22:15:25	1.1.2.2
@@ -1,4 +1,16 @@
 Getting Started with the Zope Help System
 
   Zope provides an online, searchable, context sensitive help system
-  through the standard managment interface.  
+  through the standard web managment interface.
+
+  The help system has a very simple URL in your Zope.  Just go to URL
+  <a href="/HelpSys">/HelpSys</a> in your Zope site and you will be in
+  the help system.  You can link to your help system with the
+  following HTML code::
+
+    <a href="/HelpSys">The Help System</a>
+
+  The help system's main page shows help for installed products and
+  framework components.  Products provide help for Zope's web based
+  managment interface.  Frameworks provide documentation for
+  low-level Python programming in Zope.

--- Updated File __init__.py in package Zope2 --
--- __init__.py	2001/05/17 15:59:43	1.1.2.1
+++ __init__.py	2001/05/17 22:15:25	1.1.2.2
@@ -1,7 +1,7 @@
 from HelpSys.ProductHelp import addProductHelp
-from HelpSys.HelpTopic import STXTopic
+from HelpSys.Util import lazySetup
 
 def initialize(help_sys):
     addProductHelp(help_sys, 'Help', 'Help System Documentation')
-    help_sys.Help.addTopic(STXTopic('Help.stx', 'Introduction', 'lib/python/HelpSys/help/Help.stx'))
+    lazySetup('lib/python/HelpSys/help/', help_sys.Help)