Sphinxã®éæ³ã«ããã£ã¦ã¿ã
ã¯ããã«
æè¿ããã¥ã¡ã³ãã®æ´åãæåªå
éè¦èª²é¡ã«ãªã£ã¦ããã®ã§ãããã¥ã¡ã³ããå¹çããæ¸ãããã®æ¹æ³ã調æ»ãã¦ãã¾ããã
å¹´åããããã調æ»ãã¦ãã¦ã
- ãドキュメントを作りたくなってしまう魔法のツール Sphinxã ã¨ã
- ã遷移図生成ツール blockdiagの紹介]ã ã¨ã
- ã本当のドキュメントと向き合えますかã ãè¦ã¦
ãããããSphinxã«ãããï¼ãã¨æ±ºå¿ããã®ã§ãWindowsç°å¢ã«Sphinxãå°å ¥ãã¦ã¿ã¾ããã
ããã§ããã®è¨äºã§ã¯Windowsç°å¢ã«Sphinxãå°å
¥ããããã®æé ãç´¹ä»ãããã¨æãã¾ãã
è¨äºã®ä½æã«ããã£ã¦ã次ã®ãµã¤ããåèã«ããã¦ããã ãã¾ããã
- ãblockdiag を WindowsXP で動かすã
- ãOmakeでSphinxを自動継続ビルドしてみようã
ç®æ¨
ãã®è¨äºã§ã¯ã次ã®ãã¨ãå®ç¾ã§ããç°å¢ãæ§ç¯ãã¾ãã
- Sphinxã使ã£ã¦ãããã¹ããã¡ã¤ã«(reStructuredText形式)ããHTMLãã¡ã¤ã«ãèªåçæã§ãã
- ダイアグシリーズ(blockdiag, seqdiag, actdiag, nwdiag)ã使ã£ã¦ãããã¹ããã¡ã¤ã«ããèªåçæããé·ç§»å³ãªã©ãHTMLãã¡ã¤ã«ã«çµã¿è¾¼ããã¨ãã§ãã
- OMakeã使ã£ã¦ãããã¹ããã¡ã¤ã«ã®æ´æ°ãç£è¦ãã¦ãHTMLãã¡ã¤ã«ãç¶ç¶ç£è¦ãã«ãã§ãã
- ï¼ã¤ä»¥ä¸ã®å¥ã ã®ããã¥ã¡ã³ããå°ãªãè² æ ã§ç®¡çã§ãã
- ãã¼ã«ã«HTMLã®æ´æ°æã«ããã©ã¦ã¶ãèªåãªãã¼ãã§ãã(2011/5/3追è¨)
ã¤ã³ã¹ãã¼ã«
ã¤ã³ã¹ãã¼ã«ç©
ã¤ã³ã¹ãã¼ã«ãå§ããåã«æ¬¡ã®ãã¡ã¤ã«ã対å¿ããURLããå ¥æãã¦ããã¾ãã
ãã¡ã¤ã«å | URL | æ¦è¦ |
---|---|---|
python-2.7.1.msi | http://www.python.jp/Zope/download/pythoncore | Python 2.7.1ã®ã¤ã³ã¹ãã¼ã© |
setuptools-0.6c11.win32-py2.7.exe | http://pypi.python.org/pypi/setuptools | Python 2.7ç¨setuptoolsã®ã¤ã³ã¹ãã¼ã© |
VLGothic-20110414.zip | http://vlgothic.dicey.org/ | VLã´ã·ãã¯ãã©ã³ããå«ãzipãã¡ã¤ã« |
omake-0.9.8.5-2.msi | http://omake.metaprl.org/download.html | Omake 0.9.8.6ã®ã¤ã³ã¹ãã¼ã© |
ã¤ã³ã¹ãã¼ã«å¾ã®ç¶æ
ã¤ã³ã¹ãã¼ã«å¾ã®ç¶æ ã次ã®ã¨ããã«ãªãããã«ãã¾ãã
é ç® | ã¤ã³ã¹ãã¼ã«å¾ã®ç¶æ |
---|---|
Pythonã®ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ã㪠| C:\Python27 |
OMakeã®ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ã㪠| C:\OMake |
ç°å¢å¤æ°PATH | C:\Python27, C:\Python27\Scripts, C:\OMake\bin ã追è¨ããã¦ããã㨠|
ããã¥ã¡ã³ãä½æã®ä½æ¥ç¨ã«ã¼ããã£ã¬ã¯ã㪠| C:\AllDocs |
追å ãã©ã³ãã®ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ã㪠| C:\AllDocs\Fonts |
Pythonã®ã¤ã³ã¹ãã¼ã«
python-2.7.1.msiãå®è¡ãã¦ãã¤ã³ã¹ãã¼ã©ã®æé ã«å¾ã£ã¦ã¤ã³ã¹ãã¼ã«ãã¦ä¸ããã
ã¤ã³ã¹ãã¼ã«å¾ã«ãç°å¢å¤æ°PATHã« C:\Python27 㨠C:\Python27\Scripts ã追è¨ãã¦ä¸ããã
Python setuptoolsã®ã¤ã³ã¹ãã¼ã«
setuptools-0.6c11.win32-py2.7.exeãå®è¡ãã¦ãã¤ã³ã¹ãã¼ã©ã®æé ã«å¾ã£ã¦ã¤ã³ã¹ãã¼ã«ãã¦ä¸ããã
ã¤ã³ã¹ãã¼ã«ããã¨ãeasy_installã使ç¨ã§ããããã«ãªãã¾ãã
Sphinxã¨æ¡å¼µã¢ã¸ã¥ã¼ã«ã®ã¤ã³ã¹ãã¼ã«
easy_installã使ç¨ãã¦Sphinxã¨æ¡å¼µã¢ã¸ã¥ã¼ã«ãã¤ã³ã¹ãã¼ã«ãã¾ãã
ã³ãã³ãããã³ãããã次ã®ã³ãã³ããå®è¡ãã¦ä¸ããã
2011/5/28追è¨: sphinxcontrib-seqdiag, sphinxcontrib-actdiag, sphinxcontrib-nwdiagã®ã¤ã³ã¹ãã¼ã«ã追è¨
2011/5/28追è¨: 以åã®è¨äºãåç
§ãã¦ãã¤ã¢ã°ã·ãªã¼ãºãã¤ã³ã¹ãã¼ã«ããæ¹ã¯ããã¤ã¢ã°ã·ãªã¼ãºãææ°çã«ã¢ããã°ã¬ã¼ãããããã«ãeasy_install --upgrade blockdiagã®ããã«ã--upgradeãªãã·ã§ã³ãç¨ã㦠easy_install ãå®è¡ãã¦ä¸ããã
PILãæ¸ãæãã
ãã¤ã¢ã°ã·ãªã¼ãºã§æ¥æ¬èªã使ç¨ããå ´åã¯ãPILãæ¸ãæããå¿
è¦ãããã¾ãã
ãblockdiag を WindowsXP で動かすãã®ãStep.5 -- PILãæ¸ãæãããã«å¾ã£ã¦ã_imagingft.pydãä¿®æ£ãã¦ä¸ããã
追å ãã©ã³ãã®ã¤ã³ã¹ãã¼ã«
- VLGothic-20110414.zipã解åãã¾ãã
- 解åå ãã£ã¬ã¯ããªå ã®ãVL-Gothic-Regular.ttfãã¨ãVL-PGothic-Regular.ttfãã C:\AllDocs\Fonts ã«ã³ãã¼ãã¾ãã
â» C:\WINDOWS\Fonts ã«ã³ãã¼ããæ¹æ³ãä¸è¬çã ã¨æãã¾ãããç°å¢ã¸ã®ä¾å度ãæ¸ããããã«ã·ã¹ãã ãã©ã«ãã¨ã¯ç¬ç«ãããã£ã¬ã¯ããªã«ãã¡ã¤ã«ãé
ç½®ãã¾ãã
OMakeã®ã¤ã³ã¹ãã¼ã«
omake-0.9.8.5-2.msiãå®è¡ãã¦ãã¤ã³ã¹ãã¼ã©ã®æé ã«å¾ã£ã¦ã¤ã³ã¹ãã¼ã«ãã¦ä¸ããã
ã¤ã³ã¹ãã¼ã«ããã¨ãç°å¢å¤æ°PATHã«èªåçã« C:\OMake\bin ã追è¨ããã¾ãã
ã¤ã³ã¹ãã¼ã«ç¶æ ã®ç¢ºèª
ã³ãã³ãããã³ãããéããªããã¦ã次ã®ã¨ããã«ã³ãã³ããå®è¡ãã¦ä¸ããã
2011/5/28追è¨: sphinxcontrib-seqdiag, sphinxcontrib-actdiag, sphinxcontrib-nwdiagã®ãã§ãã¯ã追è¨
ä¸é¨å²æãã¦ãã¾ãããpythonã¨omakeã¯ãã¼ã«ã®ãã¼ã¸ã§ã³ãeasy_installã§ã¤ã³ã¹ãã¼ã«ãããã®ã¯ã¢ã¸ã¥ã¼ã«ã¨ãã« already the active version in easy-install.pth ã¨åºåãããã°ï¼¯ï¼«ã§ãã
C:\AllDocs>python --version Python 2.7.1 C:\AllDocs>omake --version OMake 0.9.8.5 (release 2): build [Fri Aug 10 16:10:42 2007] on jaoquin-nt (ç¥) C:\AllDocs>easy_install sphinx Searching for sphinx Best match: sphinx 1.0.7 Processing sphinx-1.0.7-py2.7.egg sphinx 1.0.7 is already the active version in easy-install.pth (ç¥) C:\AllDocs>easy_install blockdiag Searching for blockdiag Best match: blockdiag 0.8.1 Processing blockdiag-0.8.1-py2.7.egg blockdiag 0.8.1 is already the active version in easy-install.pth (ç¥) C:\AllDocs>easy_install sphinxcontrib-blockdiag Searching for sphinxcontrib-blockdiag Best match: sphinxcontrib-blockdiag 0.8.3 Processing sphinxcontrib_blockdiag-0.8.3-py2.7.egg sphinxcontrib-blockdiag 0.8.3 is already the active version in easy-install.pth (ç¥) C:\AllDocs>easy_install seqdiag Searching for seqdiag Best match: seqdiag 0.3.4 Processing seqdiag-0.3.4-py2.7.egg seqdiag 0.3.4 is already the active version in easy-install.pth (ç¥) C:\AllDocs>easy_install sphinxcontrib-seqdiag Searching for sphinxcontrib-seqdiag Best match: sphinxcontrib-seqdiag 0.1.1 Processing sphinxcontrib_seqdiag-0.1.1-py2.7.egg sphinxcontrib-seqdiag 0.1.1 is already the active version in easy-install.pth (ç¥) C:\AllDocs>easy_install actdiag Searching for actdiag Best match: actdiag 0.1.5 Processing actdiag-0.1.5-py2.7.egg actdiag 0.1.5 is already the active version in easy-install.pth (ç¥) C:\AllDocs>easy_install sphinxcontrib-actdiag Searching for sphinxcontrib-actdiag Best match: sphinxcontrib-actdiag 0.1.1 Processing sphinxcontrib_actdiag-0.1.1-py2.7.egg sphinxcontrib-actdiag 0.1.1 is already the active version in easy-install.pth (ç¥) C:\AllDocs>easy_install nwdiag Searching for nwdiag Best match: nwdiag 0.2.4 Processing nwdiag-0.2.4-py2.7.egg nwdiag 0.2.4 is already the active version in easy-install.pth (ç¥) C:\AllDocs>easy_install sphinxcontrib-nwdiag Searching for sphinxcontrib-nwdiag Best match: sphinxcontrib-nwdiag 0.1.1 Processing sphinxcontrib_nwdiag-0.1.1-py2.7.egg sphinxcontrib-nwdiag 0.1.1 is already the active version in easy-install.pth (ç¥)
2011/5/28æ´æ°: sphinxcontrib-seqdiag, sphinxcontrib-actdiag, sphinxcontrib-nwdiagã®ãã§ãã¯çµæãå«ãå½¢ã§å
¨ä½ãæ´æ°
Sphinxããã¥ã¡ã³ãã®ä½æ
ä½æ¥ç¨ãã£ã¬ã¯ããªã®æ§æ
ï¼ã¤ä»¥ä¸ã®ç¬ç«ããããã¥ã¡ã³ããä½æãã¦ãããã¨ãèæ ®ãã¦ã次ã®ãã£ã¬ã¯ããªæ§æã«ãªãããã«ãã¾ãã
C:\AllDocs // å ¨ããã¥ã¡ã³ãå ±éã®ä½æ¥ç¨ã«ã¼ããã£ã¬ã¯ã㪠| // ãã£ã¬ã¯ããªåã¯ä»»æ | +---Fonts // 追å ãã©ã³ãã®ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ã㪠| // ãã£ã¬ã¯ããªåã¯å¾è¿°ã® additional_fontpath ã®è¨å®ã§å¤æ´å¯è½ | +---document01 // ããã¥ã¡ã³ãåºæã®ä½æ¥ç¨ãã£ã¬ã¯ã㪠| // ãã£ã¬ã¯ããªåã¯ä»»æ | +---document02 // ããã¥ã¡ã³ãåºæã®ä½æ¥ç¨ãã£ã¬ã¯ã㪠| // ãã£ã¬ã¯ããªåã¯ä»»æ | +---...
ï¼ã¤ç®ã®ããã¥ã¡ã³ãã®ä½æ
sphinx-quickstartãå®è¡ãã¦ãSphinxããã¥ã¡ã³ãã®åºæ¬ãã¡ã¤ã«ç¾¤ãçæãã¾ãã
ã³ãã³ãããã³ãããã次ã®ã³ãã³ããå®è¡ãã¦ä¸ããã
mkdir C:\AllDocs\document01 cd C:\AllDocs\document01 sphinx-quickstart
éä¸ã§è²ã
ã¨ç¢ºèªããã¾ãããªã¿ã¼ã³ãã¼ãé£æããã°ï¼¯ï¼«ã§ããããã©ã«ãå¤ãé©ç¨ã§ããé
ç®ã®å ´åã¯ã次ã®å
¥åé
ç®ã«é²ã¿ã¾ããããã©ã«ãå¤ãé©ç¨ã§ããªãï¼ã¤ã®é
ç®(ãProject nameã,ãAuthor name(s)ã,ãProject versionã)ã®å ´åã¯ãå
¥åãå®äºããã¾ã§æ¬¡ã®å
¥åé
ç®ã«é²ã¿ã¾ããã
ããã©ã«ãå¤ãé©ç¨ã§ããªãï¼ã¤ã®é
ç®ã®å
¥åä¾ã¯æ¬¡ã®ã¨ããã§ãã
The project name will occur in several places in the built documentation. > Project name: document01 > Author name(s): tyuki39 Sphinx has the notion of a "version" and a "release" for the software. Each version can have multiple releases. For example, for Python the version is something like 2.5 or 3.0, while the release is something like 2.5.1 or 3.0a1. If you don't need this dual structure, just set both to the same value. > Project version: 0.1.2
sphinx-quickstartãå®äºããã¨ãdocument01å ã次ã®ã¨ããã«ãªãã¾ãã
C:\AllDocs\document01 | conf.py // Sphinxã®è¨å®ãã¡ã¤ã« | index.rst // Sphinxã§æ´å½¢ããåã®ããã¹ããã¡ã¤ã«(reStructuredTextå½¢å¼) | make.bat // Sphinxãèªåçæããããã¥ã¡ã³ãã®ãã«ãç¨ããã | Makefile // (ãã®è¨äºã§ã¯ä¸ä½¿ç¨)Sphinxãèªåçæããããã¥ã¡ã³ãã®ãã«ãç¨Makefile | +---_build // ãã«ãçµæã®æ ¼ç´å +---_static // (ãã®è¨äºã§ã¯ä¸ä½¿ç¨)éçã³ã³ãã³ãã®æ ¼ç´å \---_templates // (ãã®è¨äºã§ã¯ä¸ä½¿ç¨)ã«ã¹ã¿ã ãã³ãã¬ã¼ãã®æ ¼ç´å
è£è¶³: Sphinxãæ´å½¢ããåã®ããã¹ããã¡ã¤ã«ã®ããã©ã«ãã®æ¡å¼µå㯠rst ã§ãã
common.pyã®ä½æ
Sphinxã®è¨å®ãã¡ã¤ã«(conf.py)ã¯ãPythonã³ã¼ããã®ãã®ã«ãªã£ã¦ãã¾ãã
ãã®ãã¨ãå©ç¨ãã¦ããdocument01åºæã®è¨å®ãã¨ãä»å¾ä½æããããã¥ã¡ã³ãã«ãå
±éããè¨å®ããåé¢ããããã«ã C:\AllDocs\common.py ãä½æãã¾ãã
common.py ã®å
容ä¾ã¯æ¬¡ã®ã¨ããã§ãã
2011/5/28æ´æ°: actdiag, seqdiag, nwdiagã® sphinxcontrib æ¡å¼µã¢ã¸ã¥ã¼ã«åã®å¤æ´ã«åããã¦ãextensionsã®å
容ãæ´æ°(ä¾: sphinxcontrib_actdiag -> sphinxcontrib.actdiag)
2011/5/28æ´æ°: èª¤è¨ acttdiag_antialias ã actdiag_antialias ã«è¨æ£
åè¨å®ã®æ¦è¦ã¯æ¬¡ã®ã¨ããã§ãã
è¨å®é ç® | 対象ã¢ã¸ã¥ã¼ã« | æ¦è¦ |
---|---|---|
additional_fontpath | ãã®è¨äºç¬èª | 追å ãã©ã³ãã®ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªãè¨å®ãã¦ãã¾ãããã®è¨äºã§ã¯ãcommon.pyããã®ç¸å¯¾ãã¹(./Fonts)ãè¨å®ãã¦ãã¾ãã |
extensions | Sphinx | Sphinxã®æ¡å¼µã¢ã¸ã¥ã¼ã«ã追å è¨å®ãã¦ãã¾ããblockdiag, actdiag, seqdiag, nwdiagãæå¹ã«ãã¦ãã¾ãã |
source_encoding | Sphinx | Sphinxã«ä¸ããããã¹ããã¡ã¤ã«(reStructuredTextãã¡ã¤ã«)ã®æåã³ã¼ããè¨å®ãã¦ãã¾ããWindowsç°å¢ã®å ´åã¯ãshift_jisãè¨å®ããæ¹ãããããããã¾ããã |
language | Sphinx | Sphinxãèªåçæããããã¥ã¡ã³ãã®è¨èªãè¨å®ãã¦ãã¾ãã |
html_theme | Sphinx | Sphinxããã¥ã¡ã³ãã®ãã¼ããè¨å®ãã¦ãã¾ããå人çã«ã¯ããã©ã«ãã®ãã¼ãããã sphinxdoc ã®æ¹ã好ãã§ãã |
html_last_updated_fmt | Sphinx | HTMLã«åºåããããã¥ã¡ã³ãçææ¥æã®ãã©ã¼ããããè¨å®ãã¦ãã¾ãã |
blockdiag_fontpath | blockdiag | blockdiagã§ä½¿ç¨ãããã©ã³ããè¨å®ãã¦ãã¾ãã |
actdiag_fontpath | actdiag | actkdiagã§ä½¿ç¨ãããã©ã³ããè¨å®ãã¦ãã¾ãã |
seqdiag_fontpath | seqdiag | seqkdiagã§ä½¿ç¨ãããã©ã³ããè¨å®ãã¦ãã¾ãã |
nwdiag_fontpath | nwdiag | nwdiagã§ä½¿ç¨ãããã©ã³ããè¨å®ãã¦ãã¾ãã |
blockdiag_antialias | blockdiag | blockdiagã§ã¢ã³ãã¨ã¤ãªã¢ã¹ãæå¹åãã¦ãã¾ãã |
actdiag_antialias | actdiag | actdiagã§ã¢ã³ãã¨ã¤ãªã¢ã¹ãæå¹åãã¦ãã¾ãã |
seqdiag_antialias | seqdiag | seqdiagã§ã¢ã³ãã¨ã¤ãªã¢ã¹ãæå¹åãã¦ãã¾ãã |
nwdiag_antialias | nwdiag | nwdiagã§ã¢ã³ãã¨ã¤ãªã¢ã¹ãæå¹åãã¦ãã¾ãã |
è£è¶³: common.pyã«ã¯ãconf.pyã®è¨å®ã«è¿½å ãããã®ãã¾ãã¯conf.pyã®è¨å®ãä¸æ¸ããããã®ãåæãã¾ãã
è£è¶³: ä¸è¨ã¯ããã¾ã§ãè¨å®ã®ä¸ä¾ã§ãã
è£è¶³: è¨å®é
ç®ã®è©³ç´°ã«ã¤ãã¦ã¯ã対象ã¢ã¸ã¥ã¼ã«ã®ããã¥ã¡ã³ããåç
§ãã¦ä¸ããã
conf.pyã®ç·¨é
common.pyãèªã¿è¾¼ãããã®Pythonã³ã¼ããconf.pyã®æ«å°¾ã«è¿½è¨ãã¾ãã
HTMLã®çæ
ããã¾ã§ã§Sphinxã®å©ç¨ç°å¢ãæ´ãã¾ããã
ã³ãã³ãããã³ãããã次ã®ã³ãã³ããå®è¡ããã¨ãSphinxãHTMLãçæãã¦ããã¾ãã
make html
ã³ãã³ããã¨ã©ã¼ãªãçµäºãã_build\htmlã«index.htmlãªã©ãçæãããã°ï¼¯ï¼«ã§ãã
ããã¥ã¡ã³ãã®èªåç¶ç¶ãã«ã
index.rstãªã©ã®rstãã¡ã¤ã«ãå¤æ´ãã度㫠make html ã¨æã£ã¦HTMLãã¡ã¤ã«ãä½ãç´ãã®ã¯å¤§å¤ã§ãã
ããã§ãOMakeã®ç¶ç¶ç£è¦ãã«ãæ©è½ãå©ç¨ãã¦ãrstãã¡ã¤ã«ã®å¤æ´ã«åããã¦HTMLãã¡ã¤ã«ãçæã§ããããã«ãã¾ãã
å ¨ããã¥ã¡ã³ãã®ä¸æ¬ãã«ãç¨è¦åã®ä½æ
ã¾ãã次ã®ã³ãã³ããå®è¡ãã¾ãã
cd C:\AllDocs
omake --install
ãã㧠C:\AllDocs ãOMakeãã«ãããªã¼ã®åºç¹ã«ãªãã¾ãã
次ã«ãOMakefileã®ä¸èº«ããã£ãã空ã«ãã¦ã次ã®ä¸è¡ã ããå«ããã¡ã¤ã«ãä½æãã¦ä¸ããã
ãã㧠C:\AllDocs\document01 ãOMakeãã«ãããªã¼ã«çµã¿è¾¼ã¾ãã¾ãã
ããã¥ã¡ã³ãåºæã®ãã«ãè¦åã®ä½æ
æå¾ã«ãC:\AllDocs\document01å
ã«æ¬¡ã®å
容ã®OMakefileãä½æãã¾ãã
è£è¶³: Sphinxã®ãã«ãã³ãã³ã㯠sphinx-build ã§ãã
è£è¶³: ãã®ãã«ãè¦åã§ã¯ HTMLãã¡ã¤ã«ãçæãã¦ãã¾ãããsphinx-buildã¯ä»ã®å½¢å¼ã®ãã¡ã¤ã«ãçæããããã®ãªãã·ã§ã³ãåãã¦ãã¾ãã
OMakeã«ãããã«ã
ãã®ç¶æ ã§ã³ãã³ãããã³ãããã次ã®ã³ãã³ããå®è¡ããã¨ãdocument01å ã®rstãã¡ã¤ã«ã«å¯¾ãã¦ãã«ããå®è¡ããã¾ãã
cd C:\AllDocs\document01
omake
ã¾ãã次ã®ã³ãã³ããå®è¡ããã¨ãç¶ç¶ç£è¦ãã«ãã¢ã¼ãã«ãªãã¾ãã
cd C:\AllDocs\document01
omake -P --verbose
document01ãã£ã¬ã¯ããªããªã¼å
ã®rstãã¡ã¤ã«ãå¤æ´ãã¦ããã«ããèªåå®è¡ããããã¨ã確èªãã¦ä¸ããã
ï¼ã¤ç®ã®ããã¥ã¡ã³ãã®ä½æ
ãcommon.pyã®ä½æãã¨ãå ¨ããã¥ã¡ã³ãã®ä¸æ¬ãã«ãç¨è¦åã®ä½æããé¤ã次ã®æé ãdocument02å ã§å®æ½ãã¦ä¸ããã
- sphinx-quickstartã®å®è¡
- conf.pyã®ç·¨é
- ããã¥ã¡ã³ãåºæã®ãã«ãè¦åã®ä½æ(document01ã§ä½æãããã¡ã¤ã«ã®ã³ãã¼ã§ï¼¯ï¼«ã§ã)
ã¾ããC:\AllDocs\document02 ãOMakeãã«ãããªã¼ã«çµã¿è¾¼ãããã«ãC:\AllDocs\OMakefile ã次ã®ã¨ããã«å¤æ´ãã¾ã(空ç½ãä¸ã¤ãã㦠document02 ã¨è¨è¿°ãã¾ã)ã
ããã§document02ãç¶ç¶ç£è¦ãã«ããå®æ½ã§ããç¶æ ã«ãªãã¾ãã
ã¾ãã次ã®ã³ãã³ããå®è¡ãã㨠document01 㨠document02 ã®ä¸¡æ¹ãä¸æ¬ãã«ããããã¨ãã§ãã¾ãã
cd C:\AllDocs
omake
ãã©ã¦ã¶ã®èªåãªãã¼ã(2011/5/3追è¨)
ãã¼ã«ã«ã®HTMLãã¡ã¤ã«ãæ´æ°ããã度ã«ããã©ã¦ã¶ããªãã¼ãããã®ã大å¤ã§ãã
ãFirefoxでの開発を高速化する自動リロードスクリプトãã§å
¬éããã¦ãããAutoReloadãããã¯ãã¼ã¯ã¬ããã使ç¨ããã¨ããã®æéãçããã¨ãã§ãã¾ãã
rstãã¡ã¤ã«ãå¤æ´ããã¨ãç¶ç¶ç£è¦ãã«ãããã¼ã«ã«HTMLãã¡ã¤ã«ãæ´æ°ãããã©ã¦ã¶ããã¼ã«ã«HTMLãã¡ã¤ã«ãèªåãªãã¼ããã¦ãããã®ã§ãããã«å¹çããããã¥ã¡ã³ããæ¸ãé²ããããããã«ãªãã¾ãã
æçµç¶æ
以ä¸ã§ç®æ¨ã«ãã¦ããç°å¢ãæ§ç¯ã§ãã¾ããããã«ãã«ãã£ã¦çæããããã¡ã¤ã«ãé¤ã㨠C:\AllDocs ãã£ã¬ã¯ããªããªã¼ã®å 容ã¯æ¬¡ã®ã¨ããã«ãªãã¾ãã
C:\AllDocs | common.py // å ¨ããã¥ã¡ã³ãã®å ±éè¨å®ãå®ç¾©ããããã®Sphinxç¨ãã¡ã¤ã« | OMakefile // å ¨ããã¥ã¡ã³ãã®ãã«ãè¦åãå®ç¾©ããããã®OMakeç¨ãã¡ã¤ã« | OMakeroot // å ¨ä½çãªãã«ãè¦åãå®ç¾©ããããã®OMakeç¨ãã¡ã¤ã« | +---document01 | | conf.py // document01åºæã®è¨å®ãå®ç¾©ããããã®Sphinxç¨ãã¡ã¤ã« | | index.rst // Sphinxã§æ´å½¢ããåã®ããã¹ããã¡ã¤ã«(reStructuredText) | | make.bat // Sphinxãèªåçæããããã¥ã¡ã³ãã®ãã«ãç¨ããã | | Makefile // (ãã®è¨äºã§ã¯ä¸ä½¿ç¨)Sphinxãèªåçæããããã¥ã¡ã³ãã®ãã«ãç¨Makefile | | OMakefile // document01ã®ãã«ãè¦åãå®ç¾©ããããã®OMakeç¨ãã¡ã¤ã« | | | +---_build // ãã«ãçµæã®æ ¼ç´å | +---_static // (ãã®è¨äºã§ã¯ä¸ä½¿ç¨)éçã³ã³ãã³ãã®æ ¼ç´å | \---_templates // (ãã®è¨äºã§ã¯ä¸ä½¿ç¨)ã«ã¹ã¿ã ãã³ãã¬ã¼ãã®æ ¼ç´å | \---document02 | | conf.py // ãã¡ã¤ã«ã®ç¨éã¯document01ã¨åã | | index.rst // ãã¡ã¤ã«ã®ç¨éã¯document01ã¨åã | | make.bat // ãã¡ã¤ã«ã®ç¨éã¯document01ã¨åã | | Makefile // ãã¡ã¤ã«ã®ç¨éã¯document01ã¨åã | | OMakefile // ãã¡ã¤ã«ã®ç¨éã¯document01ã¨åã | | | +---_build // ãã£ã¬ã¯ããªã®ç¨éã¯document01ã¨åã | +---_staticãã // ãã£ã¬ã¯ããªã®ç¨éã¯document01ã¨åã | \---_templates // ãã£ã¬ã¯ããªã®ç¨éã¯document01ã¨åã | \---Fonts VL-Gothic-Regular.ttf // VLã´ã·ãã¯ãã©ã³ã VL-PGothic-Regular.ttf // VLã´ã·ãã¯ãã©ã³ã
注æç¹
ç¶ç¶ç£è¦ãã«ãä¸ã«ä½æããrstãã¡ã¤ã«ã¯ãç¶ç¶ç£è¦ãã«ã対象å¤ã«ãªãããã§ããã¾ããç¶ç¶ç£è¦ãã«ãä¸ã¯ããã£ã¬ã¯ããªããªã¼å
ã«æ°ããrstãã¡ã¤ã«ãä½æã§ããªããªããã¨ãããã¾ãã
æ°ããrstãã¡ã¤ã«ãä½æããå ´åã¯ãç¶ç¶ç£è¦ãã«ãããã£ããä¸æ¢ãã¦ä¸ããã
ãããã«
ã¯ã¼ãããã»ããµãã¹ãã¬ããã·ã¼ãã使ç¨ãã¦ãã¦æ¬¡ã®ãããªåé¡ã§å°ã£ã¦ããªãã§ããããã
- ããã¥ã¡ã³ãã®ä½è£ãæ°ã«ãããã¦ä½æä½æ¥ãé²ã¾ãªãã
- ãªã¼ãã³ã¬ã¯ããèªåã¤ã³ãã³ãã®æ©è½ãä½è¨ã«åãã¦å°ãã
- ããã¥ã¡ã³ããæ¯è¼ãã«ããã
- ããã¥ã¡ã³ããåå²ãã¦æ§é åããã®ãé£ããã
- åä¸ãã¡ã¤ã«ãè¤æ°äººã並è¡ä½æ¥ãã¤ã¤å¤æ´ããã®ãé£ããã
- ããã¥ã¡ã³ãã®ä¸é¨ãæãåºãã¦æ°ããªããã¥ã¡ã³ããä½æããã®ãé£ããã
ãã®ãããªæ¹ã¯Sphinxã®éæ³ã«ããã£ã¦ã¿ããã¨ãã奨ããã¾ãã
Sphinxããã¥ã¡ã³ãã®æ§æã¯ããSphinxのドキュメントサンプル:業務利用例 — Python製ドキュメンテーションビルダー、Sphinxの日本ユーザ会ããåèã«ããã¨è¯ãã§ãããã
å¤æ´å±¥æ´
- 2011/5/3: ãã©ã¦ã¶ã®èªåãªãã¼ãã«é¢ããè¨è¿°ã追è¨ãã¾ããã
- 2011/5/28: ãã¤ã¢ã°ã·ãªã¼ãºã®ã¤ã³ã¹ãã¼ã«æ§æã®å¤æ´ã«åããã¦ãè¨äºãæ´æ°ãã¾ããã
common.pyã®èª¤è¨ãè¨æ£ãã¾ããã