MCPcopy Create free account
hub / github.com/DFHack/dfhack / doc_dir

Function doc_dir

conf.py:45–55  ·  view source on GitHub ↗

Yield (name, includepath) for each file in the directory.

(dirname, files, prefix)

Source from the content-addressed store, hash-verified

43# -- Autodoc for DFhack plugins and scripts -------------------------------
44
45def doc_dir(dirname, files, prefix):
46 """Yield (name, includepath) for each file in the directory."""
47 sdir = os.path.relpath(dirname, '.').replace('\\', '/').replace('../', '')
48 if prefix == '.':
49 prefix = ''
50 else:
51 prefix += '/'
52 for f in files:
53 if f[-4:] != '.rst':
54 continue
55 yield prefix + f[:-4], sdir + '/' + f
56
57
58def doc_all_dirs():

Callers 1

doc_all_dirsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected