mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
doc: make all manpages with Doxygen
Use (fixed-up) Doxygen manpage output for all program & module manpages. This also allows formatting the manual pages properly in the HTML docs. The Markdown pages work properly only with Doxygen >= 1.9.7, older versions put them to wrong place in the HTML docs.
This commit is contained in:
parent
de954655bc
commit
0fbcc87314
49 changed files with 1717 additions and 2012 deletions
|
|
@ -18,27 +18,32 @@ import os
|
|||
|
||||
|
||||
def main():
|
||||
with open(sys.argv[1], "r") as f:
|
||||
fn = sys.argv[1]
|
||||
with open(fn, "r") as f:
|
||||
text = f.read()
|
||||
|
||||
text = re.sub("#define.*", "", text)
|
||||
|
||||
m = re.search(
|
||||
r"static const char[* ]*const pulse_module_options\s+=\s+(.*?\")\s*;\s*$",
|
||||
text,
|
||||
re.M | re.S,
|
||||
)
|
||||
if m:
|
||||
res = []
|
||||
for line in m.group(1).splitlines():
|
||||
m = re.match(r"\s*\"\s*([a-z0-9_]+)\s*=\s*(.*)\"\s*$", line)
|
||||
if m:
|
||||
name = m.group(1)
|
||||
value = m.group(2).strip().strip("<>")
|
||||
res.append(f"- `{name}`: {value}")
|
||||
if "@pulse_module_options@" in text:
|
||||
m = re.search(
|
||||
r"static const char[* ]*const pulse_module_options\s+=\s+(.*?\")\s*;\s*$",
|
||||
text,
|
||||
re.M | re.S,
|
||||
)
|
||||
if m:
|
||||
res = []
|
||||
for line in m.group(1).splitlines():
|
||||
m = re.match(r"\s*\"\s*([a-z0-9_]+)\s*=\s*(.*)\"\s*$", line)
|
||||
if m:
|
||||
name = m.group(1)
|
||||
value = m.group(2).strip().strip("<>")
|
||||
res.append(f"- `{name}`: {value}")
|
||||
|
||||
res = "\n * ".join(res)
|
||||
text = text.replace("@pulse_module_options@", res)
|
||||
res = "\n * ".join(res)
|
||||
text = text.replace("@pulse_module_options@", res)
|
||||
|
||||
if os.path.basename(fn).startswith("module-") and fn.endswith(".c"):
|
||||
text = re.sub(r"^ \* ##", r" * #", text, flags=re.M)
|
||||
|
||||
print("/** \\privatesection */")
|
||||
print(text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue