From 9b85f69e9adc28ec70a217c07b86046e331d3485 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Wed, 21 May 2025 13:31:34 -0700 Subject: [PATCH] ziginfra README sync --- README.md | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index c1261ccfe07ae648f0f259b6630799e4e4a06be2..35c0bad65f6b8e1beb6000353963944e46b9b937 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,16 @@ # zig-detect-license +![loc](https://sloc.xyz/github/nektro/zig-detect-license) +[![license](https://img.shields.io/github/license/nektro/zig-detect-license.svg)](https://github.com/nektro/zig-detect-license/blob/master/LICENSE) +[![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro) +[![Zig](https://img.shields.io/badge/Zig-0.14-f7a41d)](https://ziglang.org/) +[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod) + Given an input text guess which SPDX license it most likely is an instance of -## Built With -- https://github.com/ziglang/zig master -- https://github.com/nektro/zigmod package manager - -- https://github.com/nektro/zig-licenses-text -- https://github.com/nektro/zig-leven -- https://github.com/nektro/zig-fs-check - -## Install -``` -zigmod aq add 1/nektro/detect-license -``` - ## Usage - `pub fn detect(alloc: *std.mem.Allocator, license_src: []const u8) ![]const u8` - - Given an input string, will return the SPDX licence identifier for the closest guess to which one it might be + - Given an input string, will return the SPDX license identifier for the closest guess to which one it might be - `pub fn detectInDir(alloc: *std.mem.Allocator, dir: std.fs.Dir) !?[]const u8` - Given a directory, will search for a `LICENSE` file and return the guess for which one it is. Will return `null` if the license file can not be found. If this returns null when you do indeed have a license file, please help expand the search examples by submitting a bug report. - -## License -MIT -- 2.54.0