dotnet-reuse

dotnet-reuse is a .NET library to interact with license information in REUSE-compliant sources.

Example Usage

The main entry point of the library is ReuseDirectory.ReadEntries:

using TruePath;
using FVNever.Reuse;

var repo = AbsolutePath.CurrentWorkingDirectory / "some-repo";
var entries = await ReuseDirectory.ReadEntries(repo);
foreach (var entry in entries)
{
    Console.WriteLine($"- {entry.Path}");
    foreach (var license in entry.LicenseIdentifiers)
        Console.WriteLine($"  - license found: {license}");
    foreach (var copyright in entry.CopyrightStatements)
        Console.WriteLine($"  - copyright found: {copyright}");
}

Read more in the API documentation.