kdlc
kdlc is a compressor for
KDL 2.0.0. It does not support
KDL v1 in any way.
Description
This is a simple CLI application built on top of my library -
kdly. Parsing and compressing is done by
the library. This project is responsible for the command-line interface. If you
want to file an issue (bug report, feature request, etc.), then please check if
this should go to kdly, and what version of kdly is used (kdlc -V).
For the compressing format, please refer to
kdly. To say
it briefly, the output format is a minimal representation of any valid KDL
document: all whitespace and comments are removed and everything is kept in a
single line.
Installation
For installation steps, please follow the same steps as in
kdlf, but use a different
link. For example, for go install:
go install codeberg.org/shimeoki/kdlc@latest
And for nix run:
nix run git+https://codeberg.org/shimeoki/kdlc?shallow=1
Interface
kdlc follows
POSIX Utility Conventions
for it's CLI via getopt library. The most
important aspects are that all options are a single letter and they should
precede the operands.
kdlc is a compressor for KDL v2.
If no files are given, then kdlc reads for a single document from stdin.
Otherwise the files are walked in order. The result is written to stdout, and
every document (including the last one) has a newline at the end.
Usage: kdlc [-hV] [files...]
-h print help and exit
-V print version and exit
Credits
Initial idea is from
a discussion in the main KDL repository.
License
Source code in this project is distributed under
BSD-3-Clause license. Both dependencies are distributed under their
own copies of the same BSD-3-Clause license.