sphinxcontrib.vcs¶
Define Sphinx directive to handle a repository.
-
class
sphinxcontrib.vcs.
BaseDirective
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)¶ -
get_changelog
(repo, commit)¶ - Parameters
commit (git.objects.commit.Commit) –
- Return type
docutils.nodes.Node
-
get_repo
(number_of_revisions)¶ - Parameters
number_of_revisions (int) –
- Return type
-
option_spec
: Dict[str, Callable[[str], Any]] = {'include_diff': <function flag>, 'number_of_revisions': <function positive_int>, 'revision': <function get_revision>, 'with_ref_url': <function flag>}¶
-
run
()¶ Return list of Node.
- Return type
List[docutils.nodes.Node]
-
-
class
sphinxcontrib.vcs.
GitDirective
(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)¶ -
get_changelog
(repo, commit)¶ Return changelog.
- Parameters
commit (git.objects.commit.Commit) –
- Return type
docutils.nodes.Node
-
get_repo
(number_of_revisions)¶ Return Git repository.
- Parameters
number_of_revisions (int) –
- Return type
-
-
sphinxcontrib.vcs.
add_assets
(app)¶ - Parameters
app (sphinx.application.Sphinx) –
- Return type
None
-
sphinxcontrib.vcs.
copy_assets
(app, exception)¶ - Parameters
app (sphinx.application.Sphinx) –
exception (Exception) –
- Return type
None
-
sphinxcontrib.vcs.
get_revision
(argument)¶ - Parameters
argument (str) –
- Return type
str
-
sphinxcontrib.vcs.
setup
(app)¶ - Parameters
app (sphinx.application.Sphinx) –
- Return type
Dict[str, Any]