GithubHelp home page GithubHelp logo

notary's Introduction

Notary: License your project

https://travis-ci.org/sxn/notary.svg?branch=master https://dependencyci.com/github/sxn/notary/badge

Notary is a Python CLI tool to help you manage your project's license. Licenses are fetched from choosealicense.

https://asciinema.org/a/105819.png

Installation

pip install notary

Usage

$ notary
Usage: notary [OPTIONS] COMMAND [ARGS]...

Manages your project's license.

Options:
-h, --help  Show this message and exit.

Commands:
add     Adds a license, replacing any that might exist.
remove  Removes any license present in the current folder.
$ notary add --help
Usage: notary add [OPTIONS]

Tries to find a license that matches the given LICENSE argument. If one
exists and takes a author and year, it adds them to the license. Otherwise
it writes the license without an author and year and informs the user.

:param license_name: the 'human' name of the license that should be added.
Notary will try to guess the actual name from this. :param author: Tuple
representing the name of the author. :param year: Integer representing the
year that will be written to the license.

Options:
-l, --license TEXT  The name of the license you want to add. Doesn't have to
                    be exact.
-a, --author TEXT   The name that will be on the license. Is ignored if not
                    required.
-y, --year INTEGER  The year that will be on the license. Is ignored if not
                    required.  [default: 2017]
-h, --help          Show this message and exit.
$ notary add
License name: m
The following license file(s) already exist:
/Users/sorin/Workspace/notary/LICENSE
Remove /Users/sorin/Workspace/notary/LICENSE? [y/N]: y
Removed /Users/sorin/Workspace/notary/LICENSE.
Found the following matching licenses:
1: MIT License
2: Mozilla Public License Version 2.0
Please choose which one you'd like to add [1]: 1
Author: Sorin Muntean
Adding MIT License as the project's license. Continue? [y/N]: y
Added MIT License to /Users/sorin/Workspace/notary/LICENSE
$ notary add --author 'Sorin Muntean'
License name: mit
Adding MIT License as the project's license. Continue? [y/N]: y
Added MIT License to /Users/sorin/Workspace/notary/LICENSE
$ notary add -l mit -a 'Sorin Muntean' -y 2017
Adding MIT License as the project's license. Continue? [y/N]: y
Added MIT License to /Users/sorin/Workspace/Python/Personal/github.com/notary/LICENSE
$ notary remove --help
Usage: notary remove [OPTIONS]

Tries to find a file named LICENSE or LICENSE.md. If one (or both) exists,
it asks the user if it should go ahead and remove them. Otherwise it exits
and informs the user that none could be found.

Options:
-h, --help  Show this message and exit.
$ notary remove
The following license file(s) already exist:
/Users/sorin/Workspace/notary/LICENSE
Remove /Users/sorin/Workspace/notary/LICENSE? [y/N]: y
Removed /Users/sorin/Workspace/notary/LICENSE.
$ notary remove
The following license file(s) already exist:
/Users/sorin/Workspace/notary/LICENSE
/Users/sorin/Workspace/notary/LICENSE.md
/Users/sorin/Workspace/notary/license.rst
Remove /Users/sorin/Workspace/notary/LICENSE? [y/N]: y
Removed /Users/sorin/Workspace/notary/LICENSE.
Remove /Users/sorin/Workspace/notary/LICENSE.md? [y/N]: y
Removed /Users/sorin/Workspace/notary/LICENSE.md.
Remove /Users/sorin/Workspace/notary/license.rst? [y/N]: y
Removed /Users/sorin/Workspace/notary/license.rst.
$ notary remove
No license file found in the current directory.

Documentation

You can find the documentation over at ReadTheDocs.

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.