SlideShare a Scribd company logo
1 of 18
Download to read offline
—                                        	
  
—  	
  id	
  :	
  ymotongpoo	
  
      —                                  	
  

—  OSS                                                 	
  
    —  Tornado	
               Web                     	
  
    —  Redis	
                KVS 	
  
    —  Jinja2	
                                 	
  
           	
  
    	
  
—          	
  
      1.  Sphinx                 	
  
      2.  Sphinx                        	
  
      3.  reST                                 	
  
      4.  Sphinx                                             	
  
—                                                    	
  
—                 	
  
—                        	
  
1/4	
  Sphinx                                                        	
—  2                                                  	
  

—                                	
  
       —  Python,	
  easy_install,	
  Sphinx                           3                	
  
       —                                                                         	
  
             —    Ubuntu	
  
                    $	
  sudo	
  apt-­‐get	
  install	
  python-­‐sphinx	
  	
 

             —    Mac	
  OS	
  X	
  
                    $	
  sudo	
  port	
  install	
  python-­‐sphinx	
 
	
  
—                                       	
  
2/4	
  Sphinx                                                              	
—  “sphinx-­‐quickstart”                                            	
  
	
           $	
  mkdir	
  Unix-­‐How-­‐to	
  
             $	
  cd	
  Unix-­‐How-­‐to	
  	
  
             $	
  sphinx-­‐quickstart	
 


—                                Enter                      	
             	
  .	
  

       —  conf.py                                                  	
  
—             3                                      	
  
       —                                 	
  
       —                                 	
  
       — 
3/4	
  reST                                                        	
—  reST	
  =	
  reStructuredText	
  
     —  http://sphinx-­‐users.jp/doc10/rest.html	
  
                                                                                                          	
                                                          ============	
  
—                                            	
                                            	
  
                                                          ============	
  
      —             	
                                   	
  
      —                                             	
                                     	
  
                                                          =========	
  
      —                               	
                 	
  
                                                                                            	
  
      —      	
                                          -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐	
  
                                                          	
  
                                                          -­‐                                         1	
  
—  toctree                     	
                        -­‐                                         2	
  
                                                          	
  	
  #.	
                                         1	
  
                                                          	
  	
  #.	
                                         2
4/4	
  Sphinx                                                                                     	
—                                        Makefile                                                           	
 
                  $	
  make	
  html	
 




      ============	
  
                                                    	
                          	
                                                         	
  
      ============	
                                     	
  
      	
                                                                      	
  
                     	
                                  	
  
      =========	
                                                                           1	
  
      	
                                                                                    2	
  
      -­‐                      1	
                       	
  	
  	
  1.	
                           1	
  
      -­‐                      2	
                       	
  	
  	
  2.	
                           2	
 
      	
  	
  #.	
                     1	
  
      	
  	
  #.	
                     2
 1/2	
—  HTML                               LaTeX   PDF	
   ePub    	
  
       $	
  make	
  latex	
  
       $	
  make	
  latexpdf	
  	
  
       $	
  make	
  epub	
 
	
  
—  HTML                                              	
  
	
  
                                                              	
	
  
—                                    	
  “Jinja2”                      	
  
	
  

                                                                          	
 
—                    2           html                           	
  
       —                                  	
  :	
  layout.html	
  
       —    	
  :	
  page.html	
  

—                         	
  basic	
  
             	
  

	
  
Sphinx               	
—              OSS                                               	
  
      —  Python	
  2.6.2                  	
  
      —  OpenPNE	
  Web	
  API              	
  
      —  groonga                      …            	
  
      	
  
—                                                         	
  
Sphinx                                 	
—                                                                                   Sphinx
                                             	
  
      —  Python                                                               &               	
  
          	
  (Erlang,	
  Ruby,	
  C++,	
  JavaScript…)	
  
      —                                                                      	
  
      	
  
             )	
  	
  C	
   c:function::	
  int	
  printf(const	
  char	
  *format,	
  …)	
 
                       ..	
  
Sphinx   	
—                                           	
  
      —                           	
  
      —                    	
  

—  Sphinx                	
  
                                          	
  
Sphinx      	
—  autodoc	
  –	
  docstring	
                  	
  
—  intersphinx	
  –	
      Sphinx                                             	
  
—  pngmath	
  –	
          PNG                                	
  
—  jsmath	
  –	
  JavaScript                                         	
  
—  graphviz	
  –	
  Graphviz                  	
  
—  coverage	
  –	
                                                          	
  
—  todo	
  –	
  Todo                  	
  
	
  
                              Sphinx                    	
  
Sphinx          	
—                                    	
  
      —  sdedit	
  
          —  UML              	
  
      —  blockdiag	
  
         —                                           	
  
      —  docx	
  
         —    Sphinx   Word                   	
  
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()	
  
blockdiag	
  by	
  @tk0miya	
—                                                                                                                 	
  
—  sphinxcontrib-­‐blockdiag	
                                             Sphinx
                                              	
  
	
 
           ..	
  blockdiag::	
  
           	
  
           	
  	
  	
  	
  diagram	
  webapp	
  {	
  
           	
  	
  	
  	
  	
  	
  	
  	
  login	
  -­‐>	
  something	
  -­‐>	
  logout	
  -­‐>	
  login	
  	
  	
  
           	
  	
  	
  	
  }
docx	
—  Sphinx     Word                   	
  

—                	
  by	
     	
  
—  Sphinx   	
  
   —                                         	
  
   —                    	
  
   —                           	
  
   —                           	
  
   —                                         	
  
   —                           	
  
   —                                  	
  

More Related Content

Viewers also liked

Fkaas Taklimat 1st Year Experience
Fkaas Taklimat 1st Year ExperienceFkaas Taklimat 1st Year Experience
Fkaas Taklimat 1st Year Experienceaziz200458
 
The Three Little Pigs Animation
The  Three  Little  Pigs AnimationThe  Three  Little  Pigs Animation
The Three Little Pigs Animationroom3tomarata
 
Learn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクトLearn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクトYoshifumi Yamaguchi
 
20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)Yoshifumi Yamaguchi
 
20130316 プログラミング言語Go
20130316 プログラミング言語Go20130316 プログラミング言語Go
20130316 プログラミング言語GoYoshifumi Yamaguchi
 
Pythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjpPythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjpYoshifumi Yamaguchi
 

Viewers also liked (6)

Fkaas Taklimat 1st Year Experience
Fkaas Taklimat 1st Year ExperienceFkaas Taklimat 1st Year Experience
Fkaas Taklimat 1st Year Experience
 
The Three Little Pigs Animation
The  Three  Little  Pigs AnimationThe  Three  Little  Pigs Animation
The Three Little Pigs Animation
 
Learn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクトLearn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクト
 
20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)20130228 Goノススメ(BPStudy #66)
20130228 Goノススメ(BPStudy #66)
 
20130316 プログラミング言語Go
20130316 プログラミング言語Go20130316 プログラミング言語Go
20130316 プログラミング言語Go
 
Pythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjpPythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjp
 

[20101203] ドキュメントを作りたくなってしまう魔法のツールsphinx(山口発表用)

  • 1.
  • 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,  …) ..  
  • 12. Sphinx —    —    —    —  Sphinx    
  • 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              }
  • 17. docx —  Sphinx Word   —   by    
  • 18. —  Sphinx   —    —    —    —    —    —    —