Giter Club home page Giter Club logo

lice-python's Introduction

lice

Lice generates license files. No more hunting down licenses from other projects.

Installation

About what you'd expect:

easy_install lice

or:

pip install lice

Overview

Generate a BSD-3 license, the default:

$ lice
Copyright (c) 2013, Jeremy Carbaugh

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
...

Generate an MIT license:

$ lice mit
The MIT License (MIT)
Copyright (c) 2013 Jeremy Carbaugh

Permission is hereby granted, free of charge, to any person obtaining a copy
...

Generate a BSD-3 license, specifying the year and organization to be used:

$ lice -y 2012 -o "Sunlight Foundation"
Copyright (c) 2012, Sunlight Foundation

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
...

If organization is not specified, lice will first attempt to use git config to find your name. If not found, it will use the value of the $USER environment variable. If the project name is not specified, the name of the current directory is used. Year will default to the current year.

You can see what variables are available to you for any of the licenses:

$ lice --vars mit
The mit license template contains the following variables:
  year
  organization

I want XXXXXXXXX license in here!

Great! Is it a license that is commonly used? If so, open an issue or, if you are feeling generous, fork and submit a pull request.

Usage

usage: lice [-h] [-o ORGANIZATION] [-p PROJECT] [-t TEMPLATE_PATH] [-y YEAR]
            [--vars] [license]

positional arguments:
  license               the license to generate, one of: agpl3, apache, bsd2,
                        bsd3, cddl, cc0, epl, gpl2, gpl3, lgpl, mit, mpl

optional arguments:
  -h, --help            show this help message and exit
  -o ORGANIZATION, --org ORGANIZATION
                        organization, defaults to .gitconfig or
                        os.environ["USER"]
  -p PROJECT, --proj PROJECT
                        name of project, defaults to name of current directory
  -t TEMPLATE_PATH, --template TEMPLATE_PATH
                        path to license template file
  -y YEAR, --year YEAR  copyright year
  --vars                list template variables for specified license

Changelog

0.3

  • Generate source file headers for some liceneses
  • Discover available licenses at runtime
  • Use getpass module for retrieving username
  • Better unicode support for Python 3 (thanks to astagi)
  • Add Creative Commons licenese (thanks to rjnienaber)

0.2

  • Add AGPL 3 license
  • Add extra templates variables to GPL 2 and 3

0.1

  • Initial release

lice-python's People

Contributors

jcarbaugh avatar aaronbassett avatar astagi avatar jnrowe avatar rjnienaber avatar

Watchers

Sergey Storchay avatar James Cloos avatar

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.