simple tool to create embedable files in D
D
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
source
test
.gitignore
.travis.yml
LICENSE
README.md
dub.json

README.md

file2d Build Status

Simple tool to create embedable files in #dlang

Usage:

$ file2d someaudiofile.wav > mod.d

This will read someaudiofile.wav and write it as a ubyte array literal into a dlang compatible module file mod.d. mod.d will look like this:

module mod;

static immutable ubyte[1234] = [0x12, ...];

It's also possible to use stdin instead:

$ date | file2d > date.d

This will read the output of date and output it to date.d