diff --git a/.gitmodules b/.gitmodules index f4b98c7..df72b78 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "kaitai_struct_compiler"] path = kaitai_struct_compiler url = https://github.com/det-lab/kaitai_struct_compiler - branch = ManasviGoyal/kaitai_awkward_target + branch = main diff --git a/awkward_kaitai.code-workspace b/awkward_kaitai.code-workspace new file mode 100644 index 0000000..43ebe01 --- /dev/null +++ b/awkward_kaitai.code-workspace @@ -0,0 +1,73 @@ +{ + "folders": [ + { + "path": "kaitai_struct_compiler" + }, + { + "path": "." + } + ], + "settings": { + "files.watcherExclude": { + "**/target": true + }, + "files.associations": { + "iostream": "cpp", + "any": "cpp", + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "compare": "cpp", + "complex": "cpp", + "concepts": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "map": "cpp", + "set": "cpp", + "string": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "fstream": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "istream": "cpp", + "limits": "cpp", + "new": "cpp", + "numbers": "cpp", + "ostream": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "cinttypes": "cpp", + "typeinfo": "cpp", + "variant": "cpp" + } + } +} \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 000ea34..ac62a4a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,6 @@ -# Welcome to MkDocs +# Katai struct awkward runtime + + For full documentation visit [mkdocs.org](https://www.mkdocs.org). @@ -15,3 +17,6 @@ For full documentation visit [mkdocs.org](https://www.mkdocs.org). docs/ index.md # The documentation homepage. ... # Other markdown pages, images and other files. + +## Development + diff --git a/kaitai-print-layout.py b/kaitai-print-layout.py new file mode 100644 index 0000000..975a799 --- /dev/null +++ b/kaitai-print-layout.py @@ -0,0 +1,18 @@ +from __future__ import annotations + +import sys + +sys.path.append("local") +import awkward_kaitai +import numpy as np + +testcase = sys.argv[1] + +reader = awkward_kaitai.Reader(f"test_artifacts/lib{testcase}.so") +if testcase == "scdms": + testcase = "scdms_v_two_trigger" +from glob import glob +data_filenames = glob(f"example_data/data/{testcase}.*") +assert len(data_filenames) == 1 +awkward_array = reader.load(data_filenames[0]) +print(awkward_array.layout)