cargo-generate-license

Crates.iocargo-generate-license
lib.rscargo-generate-license
version1.0.0
sourcesrc
created_at2023-02-26 19:32:46.645877
updated_at2023-02-26 19:32:46.645877
descriptionA cargo subcommand that generates `LICENSE` files.
homepage
repositoryhttps://github.com/dscottboggs/cargo-license-generator
max_upload_size
id795424
size218,280
Scott Boggs (dscottboggs)

documentation

README

cargo generate-license Test

A cargo subcommand that generates LICENSE files.

This is a fork of Azo's license-generator. I've only tweaked some minor things. The reason for this fork is because I wanted to have the command be namespaced under cargo rather than standing on its own. All credit to them for creating the original project.

Installation

Install with Cargo:

cargo install cargo-generate-license

Usage

$ cargo generate-license --author <name> [LICENSE_TYPE]

[LICENSE_TYPE]:
- AGPL
- Apache
- CC-BY
- CC-BY-NC
- CC-BY-NC-SA
- CC-BY-SA
- CC0
- GPL
- LGPL
- MIT
- MPL
- Unlicense

Options:
  --author input author name. Default: `GitName <GitEmail>`
  --project input project name that is required by some license
  --year input license year
  --output path to the output. Default: ./LICENSE

Supported Licenses

This CLI supports the following licenses:

Examples

Generate MIT LICENSE

cargo generate-license MIT --author "azu"

Output to stdout

cargo generate-license MIT --output /dev/stdout --author "azu"

Multi LICENSE

Author can be retrieved from git config.

cargo generate-license MIT Apache
# output
# LICENSE-MIT and LICENSE-APACHE

Tests

cargo test

Releases

Use cargo-release.

cargo release --no-dev-version {patch,minor,major} --execute

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT © azu, D. Scott Boggs, 2023

Commit count: 66

cargo fmt