diff options
author | Josh Morman <mormjb@gmail.com> | 2020-04-23 15:03:55 -0400 |
---|---|---|
committer | Josh Morman <mormjb@gmail.com> | 2020-06-04 10:05:48 -0400 |
commit | 999c0e723240ee783bca17942f77a9d05bbfc168 (patch) | |
tree | 3661aeb0ef10bad228df014a20e5b0a63627c833 /gr-utils/bindtool/scripts/bind_from_json.py | |
parent | a4e6d4d55b35ac36dd5915dec5145073d8ec3b9a (diff) |
utils: add functionality to generate bindings
This currently exists in two places
1) Bindtool (longevity TBD) which calls blocktool to parse the public
header file in the include directory
2) Modtool - binding of headers added to add and bind. rm, update,
info, etc still TODO
Diffstat (limited to 'gr-utils/bindtool/scripts/bind_from_json.py')
-rw-r--r-- | gr-utils/bindtool/scripts/bind_from_json.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gr-utils/bindtool/scripts/bind_from_json.py b/gr-utils/bindtool/scripts/bind_from_json.py new file mode 100644 index 000000000..863b40f5b --- /dev/null +++ b/gr-utils/bindtool/scripts/bind_from_json.py @@ -0,0 +1,15 @@ +import argparse +import os +from gnuradio.bindtool import BindingGenerator +import pathlib + +parser = argparse.ArgumentParser(description='Bind a GR header file from the generated json') +parser.add_argument('pathnames', type=str, nargs='+', + help='Json files to bind') + +args = parser.parse_args() + +bg = BindingGenerator() + +for p in args.pathnames: + bg.bind_from_json(p)
\ No newline at end of file |