Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

KOLANICH-datasets/kaitai_struct_samples

 
 

Repository files navigation

My fork of https://github.com/kaitai-io/kaitai_struct_samples used to be here where in side branches my not yet merged additions to the repo were living. I had to move from GitHub because of its forceful promotion of FIDO specifications by creating issues for users not using them (one has to use either 2FA or a FIDO2 authenticator, such as Windows Hello). It is likely that GitHub won't allow me to use my account since 2023-10-13. Now my fork lives there https://github.com/KOLANICH-datasets/kaitai_struct_samples (if I had to migrate from Codeberg, look for the further references in that repo). It is likely I cannot properly contribute to Kaitai Struct project anymore, since it seems to be unwilling to leave GitHub.


Kaitai Struct: sample library

REUSE compliant

A library of sample files for testing file format specifications from the Kaitai Struct: format library.

Contributing

Before adding a new file, it's necessary to find out who owns the copyright and under what license the file was released. If the file is hosted in a repository on GitHub and you know the hash of a commit in which the file was added, this shell command may help you with finding the author, who is usually also the copyright holder (needs curl and jq):

Shell command for extracting the commit author
auth_token=[login]:[token] # get [token] from <https://github.com/settings/tokens> (public access)

repo=ElyesH/coreboot
commit_hash=e0af9fcb2d526ffd654d0bb573dd5333d0d76269
curl \
  -s \
  -u "$auth_token" \
  -H "Accept: application/vnd.github.v3+json" \
  "https://api.github.com/repos/$repo/commits/$commit_hash" \
| jq '{html_url, message: .commit.message | .[0:index("\n\n")], author: .commit.author, spdx: {copyright: (.commit.author.name + " <" + .commit.author.email + ">"), year: (if .commit.author.date | index("-") == 4 then .commit.author.date | .[0:4] else null end)}}'
Example command output
{
  "html_url": "https://github.com/ElyesH/coreboot/commit/e0af9fcb2d526ffd654d0bb573dd5333d0d76269",
  "message": "tests: Add lib/edid-test test case",
  "author": {
    "name": "Jakub Czapiga",
    "email": "[email protected]",
    "date": "2020-10-09T14:02:46Z"
  },
  "spdx": {
    "copyright": "Jakub Czapiga <[email protected]>",
    "year": "2020"
  }
}

When you know the copyright owner, find the license of the file. Then follow the REUSE tutorial to find out how to add the information in the repo.

You can install REUSE helper tool, which helps with making that the repo compliant with the REUSE recommendations. The most useful command is reuse addheader:

reuse addheader --year 2016 --copyright="Jane Doe <[email protected]>" --license="CC0-1.0" category/format/sample.bin

Others can be found in the tutorial in collapsible boxes marked as "Tool instructions for this step".

Licensing

This repository uses REUSE to keep track of copyright and licensing information, so check the comment headers of individual files, or a file with the same name with the .license extension added (for binary files).

About

Kaitai Struct: library of sample files for testing

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.0%
  • Java 1.0%