Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (34 sloc) 1.697 kB
import sublime_plugin
from datetime import date
import getpass
class MitLicense(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
year = str(date.today().year)
username = getpass.getuser()
license = '/*******************************************************************************\n\
* Copyright (c) ' + year + ' ' + username + ' \n\
* \n\
* Permission is hereby granted, free of charge, to any person \n\
* obtaining a copy of this software and associated \n\
* documentation files (the "Software"), to deal in the \n\
* Software without restriction, including without limitation\n\
* the rights to use, copy, modify, merge, publish, distribute, \n\
* sublicense, and/or sell copies of the Software, and to permit \n\
* persons to whom the Software is furnished to do so, subject \n\
* to the following conditions:\n\
* \n\
* The above copyright notice and this permission notice shall \n\
* be included in all copies or substantial portions of the Software.\n\
* \n\
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY \n\
* OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT \n\
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS \n\
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO \n\
* EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE \n\
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN \n\
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n\
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE \n\
* OR OTHER DEALINGS IN THE SOFTWARE.\n\
* \n\
******************************************************************************/'
return [("MIT License", license)]
Jump to Line
Something went wrong with that request. Please try again.