MCPcopy
hub / github.com/sphinx-doc/sphinx / doc2path

Method doc2path

sphinx/environment/__init__.py:446–452  ·  view source on GitHub ↗

Return the filename for the document name. If *base* is True, return absolute path under self.srcdir. If *base* is False, return relative path to self.srcdir.

(self, docname: str, base: bool = True)

Source from the content-addressed store, hash-verified

444 return self.project.path2doc(filename)
445
446 def doc2path(self, docname: str, base: bool = True) -> _StrPath:
447 """Return the filename for the document name.
448
449 If *base* is True, return absolute path under self.srcdir.
450 If *base* is False, return relative path to self.srcdir.
451 """
452 return self.project.doc2path(docname, absolute=base)
453
454 def relfn2path(
455 self, filename: str | Path, docname: str | None = None

Callers 15

relfn2pathMethod · 0.95
get_outdated_filesMethod · 0.95
get_doctreeMethod · 0.95
runMethod · 0.45
parse_contentMethod · 0.45
get_outdated_docsMethod · 0.45
get_outdated_docsMethod · 0.45
readMethod · 0.45
read_docMethod · 0.45
write_documentsMethod · 0.45
process_resultMethod · 0.45

Calls

no outgoing calls

Tested by 1

get_filename_for_nodeMethod · 0.36