1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-07-30 19:03:17 +03:00

Fixed build of manpages

To build manpages run cmake with option -DWITH_DOCS=ON.
Creation of man pages requires Python3 and Docygen.

The bundled manpaes were removed from repository.
This commit is contained in:
Georg Richter
2024-09-12 14:21:10 +02:00
parent 312b7eab4d
commit cd81266f44
133 changed files with 34 additions and 6657 deletions

View File

@ -30,6 +30,7 @@ parser= argparse.ArgumentParser(prog="create_man.py",
parser.add_argument('--docs', type=str, metavar='docs', help='Directory of MariaDB Connector/C documentation')
parser.add_argument('--funcs', type=str, metavar='funcs', help='File which contains exported functions.')
parser.add_argument('--version', type=str, metavar='version', help='Connector/C version')
parser.add_argument('--out', type=str, metavar='outputdir', help='Output directory')
args= parser.parse_args()
print(args)
@ -46,9 +47,9 @@ for function in funcs:
print("warning: No documentation for function %s found" % function)
continue
f= open("%s.3.md" % function, "w")
f= open("%s/%s.3.md" % (args.out, function), "w")
f.write(header(function, args.version))
f.write(replace_links(content))
f.close()
ret= os.system("pandoc --standalone --to man %s.3.md -o man/%s.3" % (function, function))
os.unlink("%s.3.md" % function)
ret= os.system("pandoc --standalone --to man %s/%s.3.md -o %s/%s.3" % (args.out, function, args.out, function))
os.unlink("%s/%s.3.md" % (args.out, function))