A simple command line utility for fetching open source licenses available from GitHub.
To install using setuptools, run:
$ python setup.py build
$ python setup.py install
You can also install it through AUR:
$ yaourt -S python-license
You can also choose to install it with git + makepkg:
$ git clone https://aur.archlinux.org/python-license
$ cd python-license
$ makepkg -si
Install or print shell completions using click-completion.
$ license shell --install
Autodetection of shell requires psutils
installed. It should be installed by default by setup.py
.
$ license shell --shell /bin/bash --install
$ source "$(license shell --shell /bin/bash)
eval (license shell --shell /usr/bin/fish)
$ license list
$ license list '^gpl'
$ license get mit
$ license get --stdout mit
$ license get --output LICENSE mit
# or
$ license get --stdout mit > LICENSE
As of writing, the licenses aren't templated and are provided as is. For the time being, you'll have to manually replace it:
$ license get --stdout mit | sed -i 's/\[year\]/2016/g; s/\[fullname\]/my name lmao/g'
The MIT License (MIT)
Copyright (c) 2016 Jeremy Asuncion
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.