GithubHelp home page GithubHelp logo

pombredanne / licenser-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fferen/licenser

0.0 2.0 0.0 93 KB

Hassle-free way to add a software license to an existing project.

License: BSD 2-Clause "Simplified" License

licenser-2's Introduction

Choosing a software license sucks, and figuring out how to apply it correctly is a pain. Here's the solution.

This is a simple Python script to automatically license a project under one of many popular open source licenses. Simply provide the source directory, the project name and owner, and the license name, and it adds the license text into a COPYING file and prepends the right copyright headers to all source files, correctly escaped with relevant comment syntax.

It also comes with options for further configurability, such as excluding filetypes or specific directories.

Example usage:

    python licenser/ add my_project/ "Project Name" "Owner Name" freebsd

To remove headers/licenses added with this tool:

    python licenser/ rm my_project/

Features:

  • Supported source file extensions: .4th .ada .as .asm .c .cloj .cpp .cs .d .dpr .erl .f .f90 .f95 .for .forth .go .h .hla .hpp .hs .java .js .jsp .lisp .lpr .lsp .lua .m .ml .p .pas .php .pl .pp .py .rb .scala .scm .sh .sql .tcl .vb
  • Supported licenses: FreeBSD, BSD Old, BSD New, MIT, GPLv3, Apache v2, WTFPL
  • Will not override existing licenses or headers.
  • Detects shebang and appends header after it.
  • Exclude specific files or directories with the -x or -X options, respectively.

Requires the argparse module, which is included by default in Python 2.7 and 3.2+. Older versions can install it separately - see here.

Send any questions, comments, or bug reports to [email protected].


Side note: don't know which license to choose? Neither did I, until I read this excellent blog post by Jeff Atwood.

If you just want attribution but no other restrictions (as I suspect most people do), the BSD or MIT licenses seem to be the way to go.

licenser-2's People

Contributors

fferen avatar

Watchers

 avatar  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.