Skip to content

Commit

Permalink
Changed sphinx configuration to generate indexes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Onager committed Feb 23, 2018
1 parent d67ed42 commit 27bb8a7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Makefile for Sphinx documentation

# You can set these variables from the command line.
SPHINXOPTS = -W
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
Expand Down
13 changes: 13 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import time

from mock import Mock as MagicMock
from sphinx import apidoc


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -340,3 +342,14 @@ def __add__(self, other):

# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False

def RunSphinxAPIDoc(_):
"""Run sphinx-apidoc to auto-generate documentation."""
# sys.path.append(os.path.join(os.path.dirname(__file__)))
current_directory = os.path.abspath(os.path.dirname(__file__))
module = os.path.join(current_directory,"..","plaso")
apidoc.main([None, '-o', current_directory, module, '--force'])

def setup(app):
"""Override Sphinx setup to trigger sphinx-apidoc."""
app.connect('builder-inited', RunSphinxAPIDoc)

0 comments on commit 27bb8a7

Please sign in to comment.