GithubHelp home page GithubHelp logo

c4milo / licentia Goto Github PK

View Code? Open in Web Editor NEW
41.0 3.0 7.0 1.78 MB

Manage the open source licenses of your projects

License: Mozilla Public License 2.0

Go 92.75% Makefile 7.25%
license-management go cli

licentia's Introduction

Licentia

GoDoc Build Status

Helps you manage the open source licenses of your projects quickly and effortlessly.

Features

Licentia allows you to:

  • Easily manage your opensource licenses across several files
  • Update the year of your copyright notice across several files
  • Change the license of a subset of files by using glob patterns

Installation

go get github.com/c4milo/licentia

Usage

Licentia.

Usage:
  licentia set <type> <owner> <files> <eol-comment-style>
  licentia unset <type> <owner> <files> <eol-comment-style>
  licentia detect <files>
  licentia dump <type> <owner>
  licentia list
  licentia -h | --help
  licentia --version

Supported license types:

* apache2   * gpl3       * gpl2
* mpl2      * cddl       * unlicense
* mit       * epl
* newbsd    * freebsd
* lgpl3     * lgpl2

Actions:
  set                Sets a license header to the specified files
  unset              Removes license header from the specified files
  detect             Detects license type for the specified files
  dump               Dumps to stdout a given license using the specified owner and the current year
  list               List supported licenses

Arguments:
  type               License type to set. Ex: apache2, mpl2, mit, newbsd, lgpl3
  owner              Copyright owner. Ex: "YourCompany Inc"
  files              Source files to set the license header. It supports globbing patterns as well as specifying individual files. Ex: *.go, myfile.go, **/*.go
  eol-comment-style  End-of-line comment style. Ex: #, ;, //, --, ', etc.

Options:
  -h --help     Show this screen.
  --version     Show version.

Licenses supported

  • Apache License 2.0
  • Mozilla Public License 2.0
  • MIT License
  • GNU General Public License (GPL)
  • GNU Library or "Lesser" General Public License (LGPL)
  • BSD 2-Clause "Simplified" or "FreeBSD" license
  • BSD 3-Clause "New" or "Revised" license
  • Common Development and Distribution License
  • Eclipse Public Licenses
  • Unlicense

licentia's People

Contributors

c4milo avatar germanescobar avatar gitter-badger avatar mblair avatar tgulacsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

licentia's Issues

Adding an individual folder is not working

Docs say that you can add an individual folder but that won't work, the error says something like:

licentia_test.go:69: unexpected error: ! open path/to/dir: is a directory

The following test fails:

func TestSetDir(t *testing.T) {
    dirpath, err := ioutil.TempDir(os.TempDir(), "licentia-tests-")
    ok(t, err)

    defer os.Remove(dirpath)

    file, err := ioutil.TempFile(dirpath, "file-")

    config := &Config{
        CopyrightOwner:  "Test",
        LicenseType:     MPL2,
        Files:           dirpath,
        EOLCommentStyle: "//",
    }

    err = Set(config)
    ok(t, err)

    data, err := ioutil.ReadFile(file.Name())
    ok(t, err)

    equals(t, mpl2, string(data))
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.