Both a native library and a CLI tool are provided.
Building the library and CLI tool requires the following:
- The Rust compiler, version 1.10 or greater.
- Make
After cloning this repository, run cargo build
in the root directory.
This will compile the CLI tool into the target/debug/
directory.
Here is how you can get started with the dotbc
CLI tool.
dotbc -h
Output:
dotbc
A utility providing access to the .bc file type.
Usage:
dotbc <cmd> [<args>...]
dotbc (-h | --help)
dotbc --version
Options:
-h, --help Show this message
--version Print the version
The most commonly used commands are:
ls-files List all files in a .bc archive
read-file Read a file contained by a .bc archive
show-metadata Show the .bc metadata as JSON
write-file Write a file to a .bc archive
You can then run dotbc <cmd> -h
for usage documentation for each
command.
dotbc write-file -cf hello-world.bc hello.txt 'hello world'
This creates a new .bc archive, hello-world.bc. It writes the string
'hello world' at hello.txt
inside the archive.
dotbc ls-files -f hello-world.bc
Output:
hello.txt
dotbc read-file -f hello-world.bc hello.txt
Output:
hello world
libdotbc and the dotbc CLI tool are distributed under the terms of the MIT license. See LICENSE for details.