GithubHelp home page GithubHelp logo

kaitai_struct_samples's Introduction

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).

kaitai_struct_samples's People

Contributors

generalmimon avatar armijnhemel avatar

Stargazers

Christopher Layne avatar Andreas Motl avatar dgelessus avatar KOLANICH avatar

Watchers

KOLANICH avatar James Cloos avatar Connor Wood avatar Dominick Reba avatar dgelessus avatar Adrian Herrera avatar  avatar  avatar

kaitai_struct_samples's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.