2011/07/16

sphinx tips: sphinx extenstions and configurations

# Abstraction
I installed blockdiag and seqdiag provided by tk0miya.
This post show you how to install and setup *diag tools and autodoc.

# blockdiag and seqdiag installation

- blockdiag installation
sudo easy_install sphinx
sudo easy_install blockdiag
sudo easy_install sphinxcontrib-blockdiag
- seqdiag installation

sudo easy_install seqdiag
sudo easy_install sphinxcontrib-seqdiag
# additional settings into conf.py
# Enabled extensions (blockdiag and seqdiag, autodoc!)
extensions = ['sphinxcontrib.blockdiag','sphinxcontrib.seqdiag','sphinx.ext.autodoc']

# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('./codes'))

# configure default autodoc's action
autodoc_default_flags = ['members', 'undoc-members', 'show-inheritance']

# Fontpath for blockdiag (truetype font)
blockdiag_fontpath = '/usr/share/fonts/truetype/ipafont/ipagp.ttf'
blockdiag_tex_image_format = 'PNG'

# Fontpath for seqdiag (truetype font)
seqdiag_fontpath = '/usr/share/fonts/truetype/ipafont/ipagp.ttf'
seqdiag_tex_image_format = 'PNG'

No comments:

Post a Comment

100