authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-28 00:05:05 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-28 00:05:05 -07:00
log0ebd7d7c80b88fd5b606ee2ec57e9c6e23927fbf
treece652c1f2b364f4e8d3b342e683f08844852489f
parent6931e3e3e4ade3a526c662dffc1710fe1863174a

add README


1 files changed, 26 insertions(+), 0 deletions(-)

README.md created+26
...@@ -0,0 +1,26 @@
1# zig-detect-license
2
3Given an input text guess which SPDX license it most likely is an instance of
4
5## Built With
6- https://github.com/ziglang/zig master
7- https://github.com/nektro/zigmod package manager
8
9- https://github.com/nektro/zig-licenses-text
10- https://github.com/nektro/zig-leven
11- https://github.com/nektro/zig-fs-check
12
13## Install
14```
15zigmod aq add 1/nektro/detect-license
16```
17
18## Usage
19- `pub fn detect(alloc: *std.mem.Allocator, license_src: []const u8) ![]const u8`
20 - Given an input string, will return the SPDX licence identifier for the closest guess to which one it might be
21
22- `pub fn detectInDir(alloc: *std.mem.Allocator, dir: std.fs.Dir) !?[]const u8`
23 - 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.
24
25## License
26MIT