Skip to main content

License your project

Project description

https://img.shields.io/pypi/v/notary.svg https://img.shields.io/pypi/l/notary.svg https://img.shields.io/pypi/wheel/notary.svg https://img.shields.io/pypi/pyversions/notary.svg https://travis-ci.org/sxn/notary.svg?branch=master https://codecov.io/gh/sxn/notary/branch/master/graph/badge.svg https://dependencyci.com/github/sxn/notary/badge https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notary-0.1.16.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

notary-0.1.16-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

Details for the file notary-0.1.16.tar.gz.

File metadata

  • Download URL: notary-0.1.16.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for notary-0.1.16.tar.gz
Algorithm Hash digest
SHA256 58b6a26f8b35cc4b8dfe3a75c7f4d10f928f0951b177c218a62cd7ddbc47cbaa
MD5 9f970d1e2d5abbf6e811b638ba6b5510
BLAKE2b-256 ae6169352b58999b76086d6447bd2758ef3aecf7a060d9e1dcc0515c5eaf0f04

See more details on using hashes here.

File details

Details for the file notary-0.1.16-py3-none-any.whl.

File metadata

File hashes

Hashes for notary-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 6ae1fb89a4f5cd897b4375deb327a8681a1f094f0e6dc7f9e85e01e105240580
MD5 203947cca0099699ee52b82a3d0da0e1
BLAKE2b-256 e17856f8f229b0b55484ce5eb41bafaf7b6e9d713da70d8c68f8c346c7a07270

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page