hibonutil
This tool converts to and from HiBON The
hibonutilsupport the following arguments.
Documentation: https://docs.tagion.org/
Usage:
hibonutil [<option>...] [<in-file>...]
Where:
<in-file> Is an input file in .json or .hibon format
<option>:
--version display the version
-v --verbose Prints more debug information
-c --stdout Print to standard output
-s --stream Parse .hibon file to stdout
-o --output Output filename only for stdin data
-r --reserved Check reserved keys and types enabled
-p --pretty JSON Pretty print: Default: false
-U --url Set the url for a deep-link
-Q Generate binary data for a QR-code
-J Input stream format json
-t --base64url Convert to base64url output
-x --hex Convert to hex output
-T --text Input stream base64url or hex-string
--sample Produce a sample HiBON
-C --check Check the hibon protocol
-H --hash Prints the hash value
-D --dartindex Prints the DART index
--ignore Ignore document valid check
-h --help This help information.
HiBON sample
The hibonutil can produce sample HiBON files.
> hibonutil --sample
Write sample.hibon
Write sample_array.hibon
This produces two samples files.
Covert to a JSON format
By default hibonutil will convert a .hibon file to a .json file.
> hibonutil sample.hibon
Will produces a sample.json which can be seen in HiBON_JSON_format.
The json can be printed to stdout with the -c and if -p is added the in pretty prints the .json.
> hibonutil -pc sample.hibon
Covert a JSON to HiBON format
By default hibonutil will convert a .json file to a .json file.
> hibonutil sample.json
Will produces a sample.hibon file.
Convert to base64.
By adding the -b switch the file will be converted to a base64 and this will produces a .txt file.
> hibonutil -b sample.hibon
Convert to base64 to .hibon
> hibonutil sample.txt
Convert from stdin
The util can read from stdin by specifying a file name with the -o switch.
Convert from .hibon to .json
> cat sample.hibon |hibonutil -po test.json
Converting a list of files
The hibonutil can convert a list of file from .hibon to .json and vica versa.
hibonutil sample.json sample_array.hibon test.json
Produces the files sample.hibon sample_array.json test.hibon.
Generate a HiBON url
A HiBON url deep-link can be generated by.
hibon --url https://www.tagion.org/ test.hibon
Example. A deep-link QR can be generated as.
hibon --url https://www.tagion.org/ test.hibon | qrencode -o test.png
Generate a binary QR.
A binary HiBON-QR can be generate by.
hibon -Q test.hibon | qrencode -o test.png -8