sphinxter.Document

class sphinxter.Document(path: str, title: str, toctree, indent: str)

Document (rst) to write out

Parameters:
  • path (str) – where to store the

  • title (str) – title of the document

  • toctree (bool or list) – list of documents for toctree or False if none

  • indent (str) – string to use for indenting

contents: dict

document contents

If a resource’s document block has an order (default zero) that order is used as the key in the contents dict, to a list of contents for that order. That way, if nothing is specified, everything is added alphabetically. However, if you want a more obscure resource to go last, you just need to set the order greater that zero. Two resources at the same order are displayed the order in which they were added.

indent

string to use for indenting

path

where to store the document

title

title of the document

toctree

list of documents for toctree or False if none

add(module: str, kind: str, parsed: dict, order: int)

Adds content to a document

Parameters:
  • module (str) – Name of module this content is for

  • kind (str) – Kind of resource

  • parsed (dict) – The parsed documentation

  • order (int) – Where to place this content

class Content(module: str, kind: str, parsed: dict)

Content for a Document

Parameters:
  • module (str) – Name of module this content is for

  • kind (str) – Kind of resource

  • parsed (dict) – The parsed documentation

kind

Name of module this content is for

module
parsed

Kind of resource