tins2831 / ksy-dl

Downloads .ksy files and their dependencies straight from the official kaitai-struct format gallery.
GNU General Public License v3.0
4 stars 2 forks source link
kaitai-struct

ksy-dl

Downloads .ksy files and their dependencies straight from the official kaitai-struct format gallery.

This tool will:

This makes it easy to include, modify, and share official and community created kaitai-struct specifications in individual projects.

Requirements

Usage

usage: python3 ksy-dl.py QUERY OUTPUT_DIR
...

Examples:
$ python3 ksy-dl.py "network/pcap" .
$ python3 ksy-dl.py "pcap" ../kaitai # will create non-existing directories too
$ python3 ksy-dl.py "/network/pcap" network/
$ python3 ksy-dl.py "pcap.ksy" .
$ python3 ksy-dl.py "google_protobuf" .

Auto-updating the database

First, clone the kaitai format gallery from github:

$ git clone https://github.com/kaitai-io/kaitai_struct_formats.git

Then adjust and append this to your crontab:

# Update ksy-dl format db.
# Runs every day at midnight.
00 00 * * * (KAITAI_FMT_REPO=<path to repo> <path to ksy-dl repo>/tools/db-update.sh)