Methods
|
|
|
|
__del__
|
__del__ ( self )
|
|
__init__
|
__init__ (
self,
formatterFactory,
parserFunc,
defaultParserConfigValues,
inputModuleNames,
author='',
outputBaseDirectory=None,
docsetBaseDirectory=None,
descriptionFilename=None,
formatterParameters={},
ignoreDirFunc=None,
includeComments=1,
includePrivateNames=1,
usePackages=1,
prewrittenFileBasenames=( 'ANNOUNCE', 'CHANGES', 'LICENSE', 'README', 'TODO', ),
statusMessageFunc=None,
title='HappyDoc Generated Documentation (use -t to specify a new title)',
useRecursion=1,
packageName='',
docsetRoot=None,
parent=None,
**extraNamedParameters,
)
Initialize the documentation set.
Parameters
- formatterFactory
- a callable object which creates the type
of formatter class to be used for formatting
the documentation set. The object will be
called and passed the DocSet along with other
configuration values for the formatter.
- parserFunc
- Parser function which returns the info for a module.
- inputModuleNames
- List of modules or directories to be documented.
- outputBaseDirectory
- the name of the root directory for this and any
parent docsets
- docsetBaseDirectory
- the name of the root directory for this docset
- descriptionFilename
- File describing the docset as a whole.
- formatterParameters
- other named configuration values to be passed
to the formatter when it is created through the
factory. Any unrecognized values will be
quietly ignored.
- ignoreDirFunc
- Function which returns true if the directory should
be ignored.
- packageName
- Name of the package being documented by
this docset. This value should only be
specified when recursively creating a
docset (HappyDoc handles this case
automatically).
- docsetRoot=None
- The root DocSet object, when recursing.
For others, see class documentation.
|
|
_filterNames
|
_filterNames ( self, nameList )
Remove names which should be ignored.
Parameters
- nameList
- List of strings representing names of methods,
classes, functions, etc.
This method returns a list based on the contents of nameList.
If private names are being ignored, they are removed before
the list is returned.
|
|
_foundReadme
|
_foundReadme ( self )
If a README file was found, return the name of the file.
|
|
_requiredOfSubclass
|
_requiredOfSubclass ( self, name )
Convenient way to raise a consistent exception.
Exceptions
|
|
AttributeError( '%s is not implemented for this class.' % name, self.__class__.__name__ )
|
|
|
append
|
append ( self, infoObject )
Add a module to the docset.
|
|
clone
|
clone (
self,
packageName,
docsetBaseDirectory,
inputModuleNames,
)
Create a new object which is configured the same as the current.
It is possible, by passing optional arguments, to
create a clone with a different configuration. This
is useful for recursive work.
Parameters
- packageName
- The name of the package being created.
- docsetBaseDirectory
- The base of output for the new docset.
- inputModuleNames
- Names of files to be included.
|
|
close
|
close ( self )
Close the open documentation set.
|
|
closeOutput
|
closeOutput ( self, output )
Close the output handle.
Parameters
- output
- A handle created by
openOutput .
|
|
getClassInfo
|
getClassInfo ( self, className )
Returns class info if have it, None otherwise.
|
|
getCloneArguments
|
getCloneArguments (
self,
packageName,
docsetBaseDirectory,
inputModuleNames,
)
Return arguments to create a new docset based on the current one.
Parameters
- packageName
- The name of the package being created.
- docsetBaseDirectory
- The base of output for the new docset.
- inputModuleNames
- Specify the file names to be included in
the docset.
Subclasses should override this method, but should also call
the parent method using an algorithm such as:
subclass_args = {}
subclass_args.update( ParentClass.getCloneArguments(
self,
packageName,
baseDirectory,
inputModuleNames) )
subclass_args.update( {
"subClassArgument":self._sub_class_argument,
})
return subclass_args
|
|
getDescriptionAndFormat
|
getDescriptionAndFormat ( self )
Returns the complete description of the docset and the docstring converter name for the format.
|
|
getDocStringFormat
|
getDocStringFormat ( self )
Returns the docstring converter name for the docstring for this object.
|
|
getDocsetBaseDirectory
|
getDocsetBaseDirectory ( self )
Returns the base directory for this documentation set.
|
|
getDocsetRoot
|
getDocsetRoot ( self )
Return the root node of the documentation set.
|
|
getExternalDocumentationFile
|
getExternalDocumentationFile ( self, filename )
Retrieve documentation that is not in a program source file.
Parameters:
-
filename
- Name of the file to retrieve.
|
|
getFileInfo
|
getFileInfo ( self, fileName )
Parse the file and return the parseinfo instance for it.
|
|
getFilename
|
getFilename ( self )
Returns the "filename" of the documentation set.
|
|
getFormatter
|
getFormatter ( self )
Returns the formatter instance being used by this docset.
|
|
getFullOutputNameForObject
|
getFullOutputNameForObject ( self, infoObject=None )
Returns the output destination for documentation about this object.
|
|
getOutputBaseDirectory
|
getOutputBaseDirectory ( self )
Returns the base directory for all documentation sets.
|
|
getReference
|
getReference (
self,
formatter,
sourceNode,
)
Return a reference to this package from sourceNode.
|
|
getSummaryAndFormat
|
getSummaryAndFormat ( self )
Return one line summary of the documentation set.
|
|
getSymbolInfo
|
getSymbolInfo (
self,
name,
tryParent=1,
)
Look up the info record for the name.
Looks in the namespaces registered for this DOM node. If no
value is found, None is returned.
|
|
lookForPrewrittenFiles
|
lookForPrewrittenFiles ( self, dirName )
Look for prewritten documentation files in dirName .
|
|
openOutput
|
openOutput (
self,
name,
title,
subtitle,
)
Open output for writing.
Using this method to open output destinations
means they will automatically be closed.
Parameters
- name
- Name of output destination to open.
- title
- The main title to be given to the output (e.g.,
HTML page title or other documentation title).
- subtitle
- A subtitle which should be applied to the
output.
See also closeOutput .
|
|
processFiles
|
processFiles (
self,
fileNames,
moduleFileName=re.compile( r'^.*\.(py|cgi)$' ).match,
)
Get information about a list of files.
Parameters
- fileNames
- Sequence of names of files to be read.
Each file in fileNames is parsed to extract information
to be used in documenting the file.
|
|
statusMessage
|
statusMessage (
self,
message='',
verboseLevel=1,
)
Print a status message for the user.
|
|
write
|
write ( self )
Write the documentation set to the output.
Developers creating their own, new, docset types should
override this method to cause the docset instance to
generate its output.
|