[20101203] ドキュメントを作りたくなってしまう魔法のツールsphinx(山口発表用)
- 2. —
—
id
:
ymotongpoo
—
— OSS
— Tornado
Web
— Redis
KVS
— Jinja2
- 3. —
1. Sphinx
2. Sphinx
3. reST
4. Sphinx
—
—
—
- 4. 1/4
Sphinx
— 2
—
— Python,
easy_install,
Sphinx 3
—
— Ubuntu
$
sudo
apt-‐get
install
python-‐sphinx
— Mac
OS
X
$
sudo
port
install
python-‐sphinx
—
- 5. 2/4
Sphinx
— “sphinx-‐quickstart”
$
mkdir
Unix-‐How-‐to
$
cd
Unix-‐How-‐to
$
sphinx-‐quickstart
— Enter
.
— conf.py
— 3
—
—
—
- 6. 3/4
reST
— reST
=
reStructuredText
— http://sphinx-‐users.jp/doc10/rest.html
============
—
============
—
—
=========
—
—
-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐
-‐ 1
— toctree
-‐ 2
#.
1
#.
2
- 7. 4/4
Sphinx
— Makefile
$
make
html
============
============
=========
1
2
-‐ 1
1.
1
-‐ 2
2.
2
#.
1
#.
2
- 8. 1/2
— HTML LaTeX PDF
ePub
$
make
latex
$
make
latexpdf
$
make
epub
— HTML
- 9. —
“Jinja2”
— 2 html
—
:
layout.html
—
:
page.html
—
basic
- 10. Sphinx
— OSS
— Python
2.6.2
— OpenPNE
Web
API
— groonga …
—
- 11. Sphinx
— Sphinx
— Python &
(Erlang,
Ruby,
C++,
JavaScript…)
—
)
C
c:function::
int
printf(const
char
*format,
…)
..
- 13. Sphinx
— autodoc
–
docstring
— intersphinx
–
Sphinx
— pngmath
–
PNG
— jsmath
–
JavaScript
— graphviz
–
Graphviz
— coverage
–
— todo
–
Todo
Sphinx
- 14. Sphinx
—
— sdedit
— UML
— blockdiag
—
— docx
— Sphinx Word
- 15. sdedit
(Quick
Sequence
Diagram
Editor)
— UML
..
sequence-‐diagram::
:maxwidth:
500
:linewrap:
false
:threadnumber:
true
actor:Actor
sphinx:Sphinx[a]
dot:Graphviz
sdedit:Quick
Sequence
Diagram
Editor
actor:sphinx.make
html
sphinx:dot.render_diagram()
sphinx:sdedit.render_diagram()
- 16. blockdiag
by
@tk0miya
—
— sphinxcontrib-‐blockdiag
Sphinx
..
blockdiag::
diagram
webapp
{
login
-‐>
something
-‐>
logout
-‐>
login
}