pydocmk2.preprocessors.pydocmk
pydocmk2.preprocessors.pydocmk
pydocmk preprocessor
Modules
- builtin
- codecs
- collections
- inspect
- jinja2
- os
- pkgutil
- pydoc
- re
- string
- sys
Classes
- builtin.object
- MarkdownDoc(pydoc.HTMLDoc, builtin.object)
- MarkdownRepr(pydoc.TextRepr, builtin.object)
- Preprocessor
- pydoc.HTMLDoc(pydoc.Doc)
- MarkdownDoc(pydoc.HTMLDoc, builtin.object)
- pydoc.TextRepr(repr.Repr)
- MarkdownRepr(pydoc.TextRepr, builtin.object)
class MarkdownDoc(pydoc.HTMLDoc, builtin.object)
FIXME: doc* functions need an extra "level" parameter so we can the fitting h[1-6] This required overriding the 'document' function, but can only be done once all doc* functions are implemented.
- Method resolution order:
- MarkdownDoc
- pydoc.HTMLDoc
- pydoc.Doc
- builtin.object
Methods
- init(self, level_offset=0, local=False, index_url='./')
- classlink(self, object, modname)
-
Make a link for a class.
- docclass(self, object, name=None, mod=None, funcs={}, classes={}, *ignored)
-
Produce HTML documentation for a class object.
- docdata(self, object, name=None, mod=None, cl=None)
-
Produce html documentation for a data descriptor.
- docmodule(self, object, name=None, mod=None, *ignored)
-
Produce HTML5 documentation for a module object.
- docproperty(self, object, name=None, mod=None, cl=None)
-
Produce html documentation for a property.
- docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None)
-
Produce HTML documentation for a function or method object.
- formattree(self, tree, modname, parent=None)
-
Render in text a class tree as returned by inspect.getclasstree().
- formatvalue(self, object)
-
Format an argument default value as text.
- getdoc(self, object)
- heading(self, level, content, html=True)
-
Create a HTML heading
- listing(self, items, formatter=None)
- markup(self, text, escape=None, funcs={}, classes={}, methods={})
-
Mark up some plain text, given a context of symbols to look for. Each context dictionary maps object names to anchor names. i.e. Replaces plaintext URLs with linked versions Also escapes input text
- modpkglink(self, data)
-
Make a link for a module or package to display in an index.
- modulelink(self, object)
-
Make a link for a module.
- preformat(self, text)
- url(self, name)
-
Create URL for a documentable thing. Mainly intended for subclassing
Descriptors
- dict
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Attributes
- index_url = None
- level_offset = None
- local = None
Methods from pydoc.HTMLDoc
- bigsection(self, title, *args)
-
Format a section with a big heading.
- escape(self, text) from pydoc.HTMLRepr
- grey(self, text)
- index(self, dir, shadowed=None)
-
Generate an HTML index for a directory of modules.
- multicolumn(self, list, format, cols=4)
-
Format a list of items into a multi-column list.
- namelink(self, name, *dicts)
-
Make a link for an identifier, given name-to-URL mappings.
- page(self, title, contents)
-
Format an HTML page.
- repr(self, object) from pydoc.HTMLRepr
- section(self, title, fgcol, bgcol, contents, width=6, prelude='', marginalia=None, gap=' ')
-
Format a section with a heading.
Methods from pydoc.Doc
- fail(self, object, name=None, *args)
-
Raise an exception for unimplemented types.
- getdocloc(self, object, basedir='/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7')
-
Return the location of module docs or None
class MarkdownRepr(pydoc.TextRepr, builtin.object)
- Method resolution order:
- MarkdownRepr
- pydoc.TextRepr
- repr.Repr
- builtin.object
Methods
- repr1(self, x, level)
- repr_string(self, x, level)
Descriptors
- dict
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Methods from pydoc.TextRepr
- init(self)
- repr_instance(self, x, level)
- repr_str = repr_string(self, x, level)
Methods from repr.Repr
- repr(self, x)
- repr_array(self, x, level)
- repr_deque(self, x, level)
- repr_dict(self, x, level)
- repr_frozenset(self, x, level)
- repr_list(self, x, level)
- repr_long(self, x, level)
- repr_set(self, x, level)
- repr_tuple(self, x, level)
class Preprocessor(builtin.object)
This class implements the basic preprocessing.
Methods
- init(self, config)
- preprocess_section(self, section)
-
Preprocess the contents of *section*.
Descriptors
- dict
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Functions
- clean(text)
-
mainly for cleaning < and > from `Repr`s
- pydoc_html(name)
clean
- pydocmk2.preprocessors.pydocmk.clean = clean(text)
-
mainly for cleaning < and > from `Repr`s
MarkdownDoc
pydocmk2.preprocessors.pydocmk.MarkdownDoc = class MarkdownDoc(pydoc.HTMLDoc, __builtin__.object)
FIXME: doc* functions need an extra "level" parameter so we can the fitting h[1-6] This required overriding the 'document' function, but can only be done once all doc* functions are implemented.
- Method resolution order:
- MarkdownDoc
- pydoc.HTMLDoc
- pydoc.Doc
- __builtin__.object
Methods
- __init__(self, level_offset=0, local=False, index_url='./')
- classlink(self, object, modname)
-
Make a link for a class.
- docclass(self, object, name=None, mod=None, funcs={}, classes={}, *ignored)
-
Produce HTML documentation for a class object.
- docdata(self, object, name=None, mod=None, cl=None)
-
Produce html documentation for a data descriptor.
- docmodule(self, object, name=None, mod=None, *ignored)
-
Produce HTML5 documentation for a module object.
- docother(self, object, name=None, mod=None, *ignored)
-
Produce HTML documentation for a data object.
- docproperty(self, object, name=None, mod=None, cl=None)
-
Produce html documentation for a property.
- docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None)
-
Produce HTML documentation for a function or method object.
- formattree(self, tree, modname, parent=None)
-
Render in text a class tree as returned by inspect.getclasstree().
- formatvalue(self, object)
-
Format an argument default value as text.
- getdoc(self, object)
- heading(self, level, content, html=True)
-
Create a HTML heading
- listing(self, items, formatter=None)
- markup(self, text, escape=None, funcs={}, classes={}, methods={})
-
Mark up some plain text, given a context of symbols to look for. Each context dictionary maps object names to anchor names. i.e. Replaces plaintext URLs with linked versions Also escapes input text
- modpkglink(self, data)
-
Make a link for a module or package to display in an index.
- modulelink(self, object)
-
Make a link for a module.
- preformat(self, text)
- url(self, name)
-
Create URL for a documentable thing. Mainly intended for subclassing
Descriptors
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Attributes
- index_url = None
- level_offset = None
- local = None
Methods from pydoc.HTMLDoc
- bigsection(self, title, *args)
-
Format a section with a big heading.
- escape(self, text) from pydoc.HTMLRepr
- grey(self, text)
- index(self, dir, shadowed=None)
-
Generate an HTML index for a directory of modules.
- multicolumn(self, list, format, cols=4)
-
Format a list of items into a multi-column list.
- namelink(self, name, *dicts)
-
Make a link for an identifier, given name-to-URL mappings.
- page(self, title, contents)
-
Format an HTML page.
- repr(self, object) from pydoc.HTMLRepr
- section(self, title, fgcol, bgcol, contents, width=6, prelude='', marginalia=None, gap=' ')
-
Format a section with a heading.
Methods from pydoc.Doc
- document(self, object, name=None, *args)
-
Generate documentation for an object.
- fail(self, object, name=None, *args)
-
Raise an exception for unimplemented types.
- getdocloc(self, object, basedir='/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7')
-
Return the location of module docs or None
heading
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.heading = heading(self, level, content, html=True) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Create a HTML heading
url
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.url = url(self, name) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Create URL for a documentable thing. Mainly intended for subclassing
modpkglink
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.modpkglink = modpkglink(self, data) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Make a link for a module or package to display in an index.
modulelink
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.modulelink = modulelink(self, object) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Make a link for a module.
classlink
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.classlink = classlink(self, object, modname) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Make a link for a class.
formattree
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.formattree = formattree(self, tree, modname, parent=None) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Render in text a class tree as returned by inspect.getclasstree().
markup
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.markup = markup(self, text, escape=None, funcs={}, classes={}, methods={}) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Mark up some plain text, given a context of symbols to look for. Each context dictionary maps object names to anchor names. i.e. Replaces plaintext URLs with linked versions Also escapes input text
docmodule
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.docmodule = docmodule(self, object, name=None, mod=None, *ignored) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Produce HTML5 documentation for a module object.
docclass
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.docclass = docclass(self, object, name=None, mod=None, funcs={}, classes={}, *ignored) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Produce HTML documentation for a class object.
formatvalue
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.formatvalue = formatvalue(self, object) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Format an argument default value as text.
docroutine
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.docroutine = docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Produce HTML documentation for a function or method object.
docproperty
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.docproperty = docproperty(self, object, name=None, mod=None, cl=None) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Produce html documentation for a property.
docother
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.docother = docother(self, object, name=None, mod=None, *ignored) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Produce HTML documentation for a data object.
docdata
- pydocmk2.preprocessors.pydocmk.MarkdownDoc.docdata = docdata(self, object, name=None, mod=None, cl=None) unbound pydocmk2.preprocessors.pydocmk.MarkdownDoc method
-
Produce html documentation for a data descriptor.
Preprocessor
pydocmk2.preprocessors.pydocmk.Preprocessor = class Preprocessor(__builtin__.object)
This class implements the basic preprocessing.
Methods
- __init__(self, config)
- preprocess_section(self, section)
-
Preprocess the contents of *section*.
Descriptors
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
preprocess_section
- pydocmk2.preprocessors.pydocmk.Preprocessor.preprocess_section = preprocess_section(self, section) unbound pydocmk2.preprocessors.pydocmk.Preprocessor method
-
Preprocess the contents of *section*.