1 stable release
1.0.0 | May 18, 2022 |
---|
#1329 in Rust patterns
27KB
542 lines
fold-license
Folding licenses from multiple dirs with cargo
/Cargo.toml and yarn
/package.json.
- multiple repos dirs support with glob patterns.
- eg.)
fold-license -i path/to/repos1 -i path/to/repos2 -i path/to/repos3
- eg.)
fold-license -i path1/**/*/ -i path2/foo/bar
- eg.)
- Repos type:
-
cargo
/Cargo.toml repos of a Rust project. (Needcargo
CLI installed env.) -
yarn
/packages.json repos of a Node.js project. (Needyarn
CLI installed env.)
-
- Output to:
- STDOUT
- File
- Output with:
- TOML format, non-pretty or pretty.
- JSON format, non-pretty or pretty.
- MSGPACK format, binary.
- unification from a multiple licenses from a multiple source dirs.
- Run-time configuration from:
- Command line arguments.
- Prepared configuration file.
Screenshots
- Run:
- And then you got the licenses for all of indivisual repos dirs!
Install
cargo install fold-licenses
Usage
note: This package include both of bin and lib. In this section, I explain only the bin version. See also lib.rs and docs if you want to use lib version.
fold-license --help
:
USAGE:
fold-license [OPTIONS]
OPTIONS:
-c, --conf <CONF> Use configuration file if set the path. -c path/to/conf.toml
--cargo `cargo`/Cargo.toml, enabled
-f, --format <FORMAT> toml, json, msgpack. -e json
-h, --help Print help information
-i, --in <IN> input glob pattern(s). -i aaa -i bbb -i ccc ...
-o, --out <OUT> output to the path if set. else, output to stdout
-p, --pretty pretty output. **ONLY TO USE WITH A TEXT FORMAT**
-s, --silent silet a log messages
-V, --version Print version information
--yarn `yarn`/packages.json, enabled
- eg.)
fold-license -i . -i path/to/somewhere -i 'target/**/pattern/*' -o target/output.toml -s -p --cargo --yarn
- eg.)
fold-license -c example/example-conf.toml
if you want to use-c
and prepared configuration file:
# example-conf.toml; `fold-license -c example/example-conf.toml`
format = "toml"
in = [".", "path/to/somewhere", "target/**/pattern/*"]
out = "target/output.toml"
silent = true
pretty = true
cargo = true
yarn = true
LICENSE
Author
- USAGI.NETWORK / Usagi Ito https://github.com/usagi/
Dependencies
~4–6.5MB
~115K SLoC