プロジェクト API

class sphinx.project.Project(srcdir: str | os.PathLike[str], source_suffix: Iterable[str])[ソース]

プロジェクトは、Sphinx ドキュメントのソースコードセットです。

discover(exclude_paths: Iterable[str] = (), include_paths: Iterable[str] = ('**',)) set[str][ソース]

ソースディレクトリ内のすべてのドキュメントファイルを検索し、docnames に配置します。

doc2path(docname: str, absolute: bool) _StrPath[ソース]

ドキュメント名に対応するファイル名を返します。

*absolute* が True の場合、絶対パスとして返します。そうでない場合、ソースディレクトリへの相対パスとして返します。

path2doc(filename: str | PathLike[str]) str | None[ソース]

ファイルがドキュメントの場合、ファイル名に対応するドキュメント名を返します。

*filename* は、絶対パスまたはソースディレクトリからの相対パスである必要があります。

restore(other: Project) None[ソース]

前回のビルド結果を引き継ぎます。

docnames: set[str]

このプロジェクトに属するドキュメントの名前。

source_suffix

source_suffix。 source_suffix と同じです。

srcdir

ソースディレクトリ。