summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2020-05-12 17:15:28 -0700
committerScott Shawcroft <scott@tannewt.org>2020-05-12 17:28:24 -0700
commit4e8de3c554024d3ac89e9ee77b958a6932a64bec (patch)
tree4606c0cf69cef8a033aa2d95fab0811ddf49123a /docs
parentc534a872a2b5a2d5e6b7543f56539afb24261443 (diff)
Swap sphinx to autoapi and the inline stubs
Diffstat (limited to 'docs')
-rw-r--r--docs/c2rst.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/docs/c2rst.py b/docs/c2rst.py
deleted file mode 100644
index 76489dca3..000000000
--- a/docs/c2rst.py
+++ /dev/null
@@ -1,31 +0,0 @@
-def c2rst(app, docname, source):
- """ Pre-parse '.c' & '.h' files that contain rST source.
- """
- # Make sure we're outputting HTML
- if app.builder.format != 'html':
- return
-
- fname = app.env.doc2path(docname)
- if (not fname.endswith(".c") and
- not fname.endswith(".h")):
- #print("skipping:", fname)
- return
-
- src = source[0]
-
- stripped = []
- for line in src.split("\n"):
- line = line.strip()
- if line == "//|":
- stripped.append("")
- elif line.startswith("//| "):
- stripped.append(line[len("//| "):])
- stripped = "\r\n".join(stripped)
-
- rendered = app.builder.templates.render_string(
- stripped, app.config.html_context
- )
- source[0] = rendered
-
-def setup(app):
- app.connect("source-read", c2rst)