0

I need to write documentation for a parser that was developed in Kaitai. Given a .ksy file, is there any way to produce "pretty" views of the tree?

There is a two year old fork of ksc that supports GraphViz output but the resulting output is pretty hard to work with. (https://www.reddit.com/r/dataisbeautiful/comments/4zhpvh/binary_data_formats_network_packets_archives/)

I can easily determine what the nodes are but getting their immediate parent would add very useful context.

Thank you.

-David

DKovar
  • 155
  • 1
  • 9

1 Answers1

1

Please define what exactly do you expect from a "pretty tree".

GraphViz support is available in master and stable releases for a long time (as -t graphviz), and is very well supported — basically every ksy in official repo is accompanied nowadays with a chart: for example, http://formats.kaitai.io/lzh/index.html

If you want to have a tree of values (as opposed to "tree of data types"), we actually have ksdump, which allows you to dump arbitary data file using arbitrary .ksy in a YAML/JSON/XML tree of values. Will it work for you?

GreyCat
  • 16,622
  • 18
  • 74
  • 112