Categorygithub.com/tamada/lioss
modulepackage
1.0.0
Repository: https://github.com/tamada/lioss.git
Documentation: pkg.go.dev

# README

GitHub Action Build Coverage Status codebeat badge Go Report Card License Version

lioss

License Identification tool for OSS project.

:speaking_head: Overview

Generally, OSS projects have licenses. The licenses grant permissions to users for using, modifying, and sharing the software. The users of the software must follow the terms shown in the licenses.

On the other hand, today's software generally has some dependencies. Additionally, dependant software has some dependencies, too. Therefore, the dependant graph of the OSS becomes complex.

In such a situation, it is a quite tough task for checking the conflicts among licenses. The first problem is to detect a conflict between two given licenses. The second problem is to identify the license of a project. lioss tries to solve the above second problem by identifying the license of the given project.

SPDX is trying to automatically identify licenses, however, it is hard to say that it became common sense. This project detects the OSS licenses from the LICENSE files of the given projects. Then, we aim to detect conflicts by identifying OSS licenses from the license files of dependent libraries.

Usage

lioss

Identifies license name from file and/or project directories.

lioss version 1.0.0
lioss [OPTIONS] <PROJECTS...>
OPTIONS
        --dbpath <DBPATH>          specifying database path.
    -a, --algorithm <ALGORITHM>    specifies algorithm. Default is 5gram.
                                   Available values are: kgram, wordfreq, and tfidf.
    -t, --threshold <THRESHOLD>    specifies threshold of the similarities of license files.
                                   Each algorithm has default value. Default value is 0.75.
    -h, --help                     print this message.
PROJECTS
    project directories, archive files (jar, and zip) contains LICENSE file, and/or LICENSE file.

mkliossdb

Creates the database of lioss from License documents.

mkliossdb [OPTIONS] <LICENSE...>
OPTIONS
    -d, --dest <DEST>        specifies the destination file path. Default is 'liossdb.json'
    -h, --help               print this message.
LICENSE
    specifies license files.

Install

Go-lang

$ go get github.com/tamada/lioss

:beer: Homebrew

$ brew tap tamada/brew
$ brew install lioss

:muscle: Compiling yourself

$ git clone github.com/tamada/lioss
$ cd lioss
$ make

References

  • dmgerman/ninka
    • Daniel M. German, Yuki Manabe and Katsuro Inoue. A sentence-matching method for automatic license identification of source code files. In 25nd IEEE/ACM International Conference on Automated Software Engineering (ASE 2010).
    • This product identifies the license of each source file. However, it does not work on my environment.
  • pivotal/LicenseFinder
    • This product finds dependencies from build file, and find license.
  • SPDX (Software Package Data Exchange). *

# Packages

No description provided by the author
No description provided by the author

# Functions

LoadDatabase loads the lioss database from system path.
NewAlgorithm create an instance of Algorithm.
NewDatabase create an instance of database for lioss.
NewIdentifier creates an instance of Identifier with the given arguments.
NewProject creates an instance of Project.
Now returns now time.*/.
Read reads database from given reader.
ReadDatabase reads database from given path.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

AvailableAlgorithms contains the names of available algorithm for comparing licenses.

# Structs

Database represents the database for the lioss.
Identifier is a type for identifying the license.
License shows the license data for identifying.
Result shows identified license and its probability.
Time represents the time for marshaling a specific format.*/.

# Interfaces

Algorithm shows an algorithm for identifying the license.
LicenseFile shows the path of license in the project.
Project shows project containing some licenses.

# Type aliases

No description provided by the author