#! /usr/bin/env python3
# -*- coding: utf-8 -*-
-# Copyright (c) 2019. The SimGrid Team.
-# All rights reserved.
+# Copyright (c) 2019. The SimGrid Team. All rights reserved.
# This program is free software; you can redistribute it and/or modify it
# under the terms of the license (GNU LGPL) which comes with this package.
but not documented with autodoxy in the RST files.
This script is tailored to SimGrid own needs and should be made more generic for autodoxy.
+
+If you are missing some dependencies, try: pip3 install --requirement docs/requirements.txt
"""
import fnmatch
def found_decl(kind, obj):
"""Helper function that add an object in the python_decl data structure"""
- if kind not in python_decl: python_decl[kind] = []
+ if kind not in python_decl:
+ python_decl[kind] = []
python_decl[kind].append(obj)
kind = member.attrib["kind"]
name = member.find("name").text
if kind == "variable":
- if compoundname not in doxy_vars: doxy_vars[compoundname] = []
+ if compoundname not in doxy_vars:
+ doxy_vars[compoundname] = []
doxy_vars[compoundname].append(name)
elif kind == "function":
args = member.find('argsstring').text
args = re.sub('\)[^)]*$', ')', args) # ignore what's after the parameters (eg, '=0' or ' const')
- if compoundname not in doxy_funs: doxy_funs[compoundname] = {}
- if name not in doxy_funs[compoundname]: doxy_funs[compoundname][name] = []
+ if compoundname not in doxy_funs:
+ doxy_funs[compoundname] = {}
+ if name not in doxy_funs[compoundname]:
+ doxy_funs[compoundname][name] = []
doxy_funs[compoundname][name].append(args)
else:
print ("member {}::{} is of kind {}".format(compoundname, name, kind))
for obj in doxy_vars:
for meth in sorted(doxy_vars[obj]):
print(".. autodoxyvar:: {}::{}".format(obj, meth))
-