■ はじめに
https://dk521123.hatenablog.com/entry/2019/10/23/212149
の続き。 徐々にだが、Pythonのコメントから ドキュメント化するツールについて、まとめていく
目次
【1】Sphinx(スフィンクス) 【2】Doxygen(ドキシジェン)
【1】Sphinx(スフィンクス)
https://www.sphinx-doc.org/ja/master/
1)インストール
https://sphinx-users.jp/gettingstarted/index.html
https://www.sphinx-doc.org/ja/master/usage/installation.html
で自分の環境に合わせたインストールを選ぶ
For Windows
pip install -U sphinx sphinx-quickstart --version
2)ドキュメント生成
$ sphinx-quickstart docs
# 回答の仕方は以下のサイトも参照
https://sphinx-users.jp/gettingstarted/sphinxquickstart.html
Welcome to the Sphinx 7.2.6 quickstart utility. Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). Selected root path: docs You have two options for placing the build directory for Sphinx output. Either, you use a directory "_build" within the root path, or you separate "source" and "build" directories within the root path. > Separate source and build directories (y/n) [n]: y The project name will occur in several places in the built documentation. > Project name: hello-world > Author name(s): demo > Project release []: If the documents are to be written in a language other than English, you can select a language here by its language code. Sphinx will then translate text that it generates into that language. For a list of supported codes, see https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language. > Project language [en]: en Creating file C:\xxxx\python\docs\source\conf.py. Creating file C:\xxxx\python\docs\source\index.rst. Creating file C:\xxxx\python\docs\Makefile. Creating file C:\xxxx\python\docs\make.bat. Finished: An initial directory structure has been created. You should now populate your master file C:\xxxx\python\docs\source\index.rst and create other documentation source files. Use the Makefile to build the docs, like so: make builder where "builder" is one of the supported builders, e.g. html, latex or linkcheck.
参考文献
https://qiita.com/futakuchi0117/items/4d3997c1ca1323259844
【2】Doxygen(ドキシジェン)
以下の関連記事を参照
https://dk521123.hatenablog.com/entry/38018326
関連記事
Python ~ 基本編 / コメント文 ~
https://dk521123.hatenablog.com/entry/2019/10/23/212149