Dead simple, minimal SPDX License generator library written in Rust.

Overview

lice

Build Status License Docs Latest Version rustc 1.31+

Dead simple, minimal SPDX License generator library written in Rust. Lice is in beta

Install | User Docs | Crate Docs | Reference | Contributing | License | Attribution

What is lice?

lice is a dead simple, minimal library for generating valid SPDX licenses. It was primarily built for amble but ripped out into it's own crate to provide an extensible library, published on crates.io.

Usage

Install lice with cargo.

cargo add lice

A short example to query for the MIT License is shown below.

use anyhow::Result;

#[tokio::main]
async fn main() -> Result<()> {
    let license = lice::get("mit").await?;
    assert_eq!(license.license_id, "MIT");
    Ok(())    
}

Under the hood, the get function fetches licenses and fuzzy matches, using the first choice to query the license details, returning the merged License and its details.

Contributing

All contributions are welcome! Experimentation is highly encouraged and new issues are welcome.

Troubleshooting & Bug Reports

Please check existing issues for similar bugs or open an issue if no relevant issue already exists.

Attribution

Much of this work is based off of lic, an spdx license generator binary that isn't extensible as a library. The adapted lice crate extends the SPDX "API" to provide more verbose license fetching methods. Big h/t to the creators of lic especially SigureMo

License

This project is licensed under the MIT License. Free and open-source, forever. All our rust are belong to you.

You might also like...
🦀 Rust-based implementation of a Snowflake Generator which communicates using gRPC

Clawflake Clawflake is a Rust application which implements Twitter Snowflakes and communicates using gRPC. Snowflake ID numbers are 63 bits integers s

Nexmark event generator in Rust.

Nexmark-rs The Nexmark benchmark data generator in Rust. Installation cargo install nexmark --features bin Usage Generate nexmark events. Print one pe

A code generator to reduce repetitive tasks and build high-quality Rust libraries. 🦀

LibMake A code generator to reduce repetitive tasks and build high-quality Rust libraries Welcome to libmake 👋 Website • Documentation • Report Bug •

Pure rust implementation of python's random module with compatible generator behaviour.

pyrand Pure rust implementation of (parts of) python's random module with compatible PRNG behaviour: seeding with equivalent values will yield identic

Minimal viable ZFS autosnapshot tool

zfs-autosnap Minimal viable ZFS snapshot utility. Add zfs-autosnap snap to your cron.hourly, and zfs-autosnap gc to cron.daily; then set at.rollc.at:s

untyped-arena provides an Arena allocator implementation that is safe and untyped with minimal complexity

untyped-arena untyped-arena provides an Arena allocator implementation that is safe and untyped with minimal complexity Usage let arena = Arena::new()

Minimal virus genome coverage assessment for metagenomic diagnostics
Minimal virus genome coverage assessment for metagenomic diagnostics

vircov Minimal virus genome coverage assessment for metagenomic diagnostics Overview v0.5.0 Purpose Implementation Installation Usage Tests Concept Cl

Minimal runtime / startup for RISC-V CPUs from Espressif

esp-riscv-rt Minimal runtime / startup for RISC-V CPUs from Espressif. Much of the code in this repository originated in the rust-embedded/riscv-rt re

Flexible snowflake generator, reference snoyflake and leaf.

Flexible snowflake generator, reference snoyflake and leaf.

Licensebat - 🔐⛵ Effortless dependency compliance with your license policies

Licensebat All docs here are temporary. Thougths For the moment, it seems it makes sense to have all the collectors sharing the same trait. That doesn

Licensebat 19 Dec 28, 2022
A simple code boilerplate generator written in Rust.

?? Cgen What is Cgen? A modern, cross-platform, multi-language boilerplate generator aimed to make your code generation less hectic! If you wish to su

Rithul Kamesh 1 Dec 25, 2021
A simple quote-based code generator for Rust

flexgen A flexible, yet simple quote-based code generator for creating beautiful Rust code Why? Rust has two types of macros, and they are both very p

Scott Meeuwsen 11 Oct 13, 2022
A simple, fast, easy README generator

Welcome to Readme Generator A simple, fast, easy README generator. Never worry about READMEs again! What it does: Run the command in your project's di

Dhravya Shah 41 Nov 13, 2022
Universal changelog generator using conventional commit+ with monorepo support. Written in Rust.

chlog Universal changelog generator using conventional commit+ with monorepo support. chlog can generate the changelog from the conventional commits w

Jeff Yang 3 Nov 27, 2022
Boot tools: loader, image generator, etc as a library crate

ArcBoot v0 A uefi bootloader for riscv, arm and x86. Comes in the form of a single executable. the source code contains a single executable target and

Spectral Project 3 Oct 3, 2022
A lean, minimal, and stable set of types for color interoperation between crates in Rust.

This library provides a lean, minimal, and stable set of types for color interoperation between crates in Rust. Its goal is to serve the same function that mint provides for (linear algebra) math types.

Gray Olson 16 Sep 21, 2022
Minimal, flexible framework for implementing solutions to Advent of Code in Rust

This is advent_of_code_traits, a minimal, flexible framework for implementing solutions to Advent of Code in Rust.

David 8 Apr 17, 2022
diff successive buffers with embedded ansi codes in rust, outputting a minimal change

ansi-diff diff successive buffers with embedded ansi codes in rust, outputting a minimal change You can use this crate to build command-line interface

James Halliday 7 Aug 11, 2022
Minimal, flexible & user-friendly X and Wayland tiling window manager with rust

SSWM Minimal, flexible & user-friendly X and Wayland tiling window manager but with rust. Feel free to open issues and make pull requests. [Overview]

Linus Walker 19 Aug 28, 2023