├── .github ├── ISSUE_TEMPLATE │ ├── question.md │ ├── feature_request.md │ └── bug_report.md └── PULL_REQUEST_TEMPLATE.md ├── contributing.md ├── wtfpl.go ├── license ├── isc.go ├── go.sum ├── unlicense.go ├── mit.go ├── main.go ├── bsd.go ├── boml.go ├── cc0.go ├── gpl.go └── readme.md /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 🤔 3 | about: Usage question or discussion 4 | labels: question 5 | --- 6 | 7 | ### Question 🤔 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Summary 2 | 3 | 4 | 5 | 6 | ### Changes 7 | 8 | - 9 | 10 | 11 | ### Notes 12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature ✨ 3 | about: Suggest new idea for the project 4 | labels: enhancement 5 | --- 6 | 7 | ### Feature ✨ 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug 🐞 3 | about: Something isn't working as expected? 4 | labels: bug 5 | --- 6 | 7 | ### Bug 🐞 8 | 9 | 10 | 11 | 12 | ### Steps to Reproduce: 13 | 14 | 1. 15 | 2. 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Thank you for taking the time to contribute! ♥️ You can: 4 | 5 | - Submit [bug reports or feature requests](../../issues/new/choose). Contribute to discussions. Fix [open issues](../../issues). 6 | - Improve docs, the code and more! Any idea is welcome. 7 | 8 | ## Run project 9 | 10 | 1. Clone repo 11 | 2. If you use [VSCode](https://code.visualstudio.com) with [Go](https://github.com/microsoft/vscode-go) plugin, it will install all Go dependencies for you in the background when you open the project. 12 | 3. Edit the code & run it with `go run .`. 13 | 14 | I use [watchexec](https://github.com/watchexec/watchexec) to develop. 15 | 16 | Running `watchexec --exts go "echo -- && go run ."` will automatically rerun `go run .` for you on every Go file changed. 17 | -------------------------------------------------------------------------------- /wtfpl.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | "strconv" 9 | "time" 10 | ) 11 | 12 | // wtfplCreate creates the WTFPL license 13 | func wtfplCreate(name string, surname string, fileName string) error { 14 | year, _, _ := time.Now().Date() 15 | fo, err := os.Create(fileName) 16 | if err != nil { 17 | log.Fatal(err) 18 | } 19 | defer fo.Close() 20 | 21 | WTFPL := " DO WHAT THE FUCK YOU WANT TO PUBLIC license\n" + 22 | " Version 2, December 2004\n\n" + 23 | "Copyright (c) " + strconv.Itoa(year) + "-present, " + name + " " + surname + "\n\n" + 24 | "Everyone is permitted to copy and distribute verbatim or modified\n" + 25 | "copies of this license document, and changing it is allowed as long\n" + 26 | "as the name is changed.\n\n" + 27 | " DO WHAT THE FUCK YOU WANT TO PUBLIC license\n" + 28 | " TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n" + 29 | "0. You just DO WHAT THE FUCK YOU WANT TO.\n" 30 | 31 | ioutil.WriteFile(fileName, []byte(WTFPL), 0644) 32 | fmt.Println("License was created") 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Nikita (nikiv.dev) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /isc.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | "strconv" 9 | "time" 10 | ) 11 | 12 | // iscCreate creates the ISC license 13 | func iscCreate(name string, surname string, fileName string) error { 14 | year, _, _ := time.Now().Date() 15 | fo, err := os.Create(fileName) 16 | if err != nil { 17 | log.Fatal(err) 18 | } 19 | defer fo.Close() 20 | 21 | ISC := "Copyright (c) " + strconv.Itoa(year) + "-present, " + name + " " + surname + "\n\n" + 22 | "Permission to use, copy, modify, and distribute this software for any\n" + 23 | "purpose with or without fee is hereby granted, provided that the above\n" + 24 | "copyright notice and this permission notice appear in all copies.\n\n" + 25 | "THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n" + 26 | "WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n" + 27 | "MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n" + 28 | "ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n" + 29 | "WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n" + 30 | "ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n" + 31 | "OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n" 32 | 33 | ioutil.WriteFile(fileName, []byte(ISC), 0644) 34 | fmt.Println("License was created") 35 | return nil 36 | } 37 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= 2 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 3 | github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= 4 | github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= 5 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 6 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 7 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 8 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 9 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 10 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 11 | github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= 12 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 13 | gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= 14 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 15 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 16 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 17 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= 18 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 19 | -------------------------------------------------------------------------------- /unlicense.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | ) 9 | 10 | // unlicenseCreate creates the Unlicense license 11 | func unlicenseCreate(fileName string) error { 12 | fo, err := os.Create(fileName) 13 | if err != nil { 14 | log.Fatal(err) 15 | } 16 | defer fo.Close() 17 | 18 | Unlicense := "This is free and unencumbered software released into the public domain.\n\n" + 19 | "Anyone is free to copy, modify, publish, use, compile, sell, or\n" + 20 | "distribute this software, either in source code form or as a compiled\n" + 21 | "binary, for any purpose, commercial or non-commercial, and by any\n" + 22 | "means.\n\n" + 23 | "In jurisdictions that recognize copyright laws, the author or authors\n" + 24 | "of this software dedicate any and all copyright interest in the\n" + 25 | "software to the public domain. We make this dedication for the benefit\n" + 26 | "of the public at large and to the detriment of our heirs and\n" + 27 | "successors. We intend this dedication to be an overt act of\n" + 28 | "relinquishment in perpetuity of all present and future rights to this\n" + 29 | "software under copyright law.\n\n" + 30 | "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" + 31 | "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n" + 32 | "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n" + 33 | "IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n" + 34 | "OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n" + 35 | "ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n" + 36 | "OTHER DEALINGS IN THE SOFTWARE.\n\n" + 37 | "For more information, please refer to \n" 38 | 39 | ioutil.WriteFile(fileName, []byte(Unlicense), 0644) 40 | fmt.Println("License was created") 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /mit.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | "strconv" 9 | "time" 10 | ) 11 | 12 | // mitCreateWithSite creates MIT license with name and a website 13 | func mitCreateWithSite(name string, surname string, site string, fileName string) error { 14 | year, _, _ := time.Now().Date() 15 | fo, err := os.Create(fileName) 16 | if err != nil { 17 | log.Fatal(err) 18 | } 19 | defer fo.Close() 20 | 21 | MIT := "MIT License\n\n" + 22 | "Copyright (c) " + strconv.Itoa(year) + name + " " + surname + " (" + site + ")\n\n" + 23 | "Permission is hereby granted, free of charge, to any person obtaining a copy\n" + 24 | "of this software and associated documentation files (the \"Software\"), to deal\n" + 25 | "in the Software without restriction, including without limitation the rights\n" + 26 | "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n" + 27 | "copies of the Software, and to permit persons to whom the Software is\n" + 28 | "furnished to do so, subject to the following conditions:\n\n" + 29 | "The above copyright notice and this permission notice shall be included in all\n" + 30 | "copies or substantial portions of the Software.\n\n" + 31 | "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" + 32 | "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" + 33 | "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n" + 34 | "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n" + 35 | "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n" + 36 | "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n" + 37 | "SOFTWARE." 38 | 39 | ioutil.WriteFile(fileName, []byte(MIT), 0644) 40 | fmt.Println("License was created") 41 | return nil 42 | } 43 | 44 | // mitCreate creates MIT license 45 | func mitCreate(name string, surname string, fileName string) error { 46 | year, _, _ := time.Now().Date() 47 | fo, err := os.Create(fileName) 48 | if err != nil { 49 | log.Fatal(err) 50 | } 51 | defer fo.Close() 52 | 53 | MIT := "MIT License\n\n" + 54 | "Copyright (c) " + strconv.Itoa(year) + "-present " + name + " " + surname + "\n\n" + 55 | "Permission is hereby granted, free of charge, to any person obtaining a copy\n" + 56 | "of this software and associated documentation files (the \"Software\"), to deal\n" + 57 | "in the Software without restriction, including without limitation the rights\n" + 58 | "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n" + 59 | "copies of the Software, and to permit persons to whom the Software is\n" + 60 | "furnished to do so, subject to the following conditions:\n\n" + 61 | "The above copyright notice and this permission notice shall be included in all\n" + 62 | "copies or substantial portions of the Software.\n\n" + 63 | "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" + 64 | "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" + 65 | "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n" + 66 | "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n" + 67 | "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n" + 68 | "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n" + 69 | "SOFTWARE.\n" 70 | 71 | ioutil.WriteFile(fileName, []byte(MIT), 0644) 72 | fmt.Println("License was created") 73 | return nil 74 | } 75 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bufio" 5 | "fmt" 6 | "io/ioutil" 7 | "log" 8 | "os" 9 | 10 | kingpin "gopkg.in/alecthomas/kingpin.v2" 11 | ) 12 | 13 | var ( 14 | app = kingpin.New("license-up", "A command-line tool to make licences.").Version("1.0.0") 15 | force = app.Flag("force", "Create a license even if license already exists.").Short('f').Bool() 16 | md = app.Flag("md", "Create a license.md file instead of a license file.").Bool() 17 | mit = app.Command("mit", "Create MIT license.") 18 | mitName = mit.Arg("name", "Name of license holder.").Required().String() 19 | mitSurname = mit.Arg("surname", "Surname of license holder.").Required().String() 20 | mitWebsite = mit.Arg("website", "Website of license holder").String() 21 | bsd2 = app.Command("bsd2", "Create BSD 2-Clause license.") 22 | bsd2Name = bsd2.Arg("name", "Name of license holder.").Required().String() 23 | bsd2Surname = bsd2.Arg("surname", "Surname of license holder.").Required().String() 24 | bsd3 = app.Command("bsd3", "Create BSD 3-Clause license.") 25 | bsd3Name = bsd3.Arg("name", "Name of license holder.").Required().String() 26 | bsd3Surname = bsd3.Arg("surname", "Surname of license holder.").Required().String() 27 | cc0 = app.Command("cc0", "Create CC0 license.") 28 | unlicense = app.Command("unlicense", "Create Unlicense license.") 29 | gpl2 = app.Command("gpl2", "Create GNU General Public License version 2.") 30 | gpl3 = app.Command("gpl3", "Create GNU General Public License version 3.") 31 | isc = app.Command("isc", "Create ISC license.") 32 | iscName = isc.Arg("name", "Name of license holder.").Required().String() 33 | iscSurname = isc.Arg("surname", "Surname of license holder.").Required().String() 34 | wtfpl = app.Command("wtfpl", "Create WTFPL license.") 35 | wtfplName = wtfpl.Arg("name", "Name of license holder.").Required().String() 36 | wtfplSurname = wtfpl.Arg("surname", "Surname of license holder.").Required().String() 37 | boml = app.Command("boml", "Create Blue Oak Model license.") 38 | ) 39 | 40 | func main() { 41 | kingpin.MustParse(app.Parse(os.Args[1:])) 42 | // Check to see if the user wants to create a `license.md` file instead of a `license` file 43 | fileName := "license" 44 | if bool(*md) == true { 45 | fileName = "license.md" 46 | } 47 | // Check to see if we are overwriting any existing license files 48 | if bool(*force) == false { 49 | files, err := ioutil.ReadDir(".") 50 | if err != nil { 51 | log.Fatal(err) 52 | } 53 | reader := bufio.NewReader(os.Stdin) 54 | overwrite := false 55 | hasLicense := false 56 | for _, f := range files { 57 | if f.Name() == fileName { 58 | hasLicense = true 59 | fmt.Print("There is already a license present in current directory. Do you want to overwrite it with a new one? [y/N] ") 60 | text, _ := reader.ReadString('\n') 61 | switch text { 62 | case "y\n": 63 | overwrite = true 64 | case "Y\n": 65 | overwrite = true 66 | } 67 | } 68 | } 69 | if hasLicense == true && overwrite == false { 70 | os.Exit(0) 71 | } 72 | } 73 | // Create the licenses 74 | switch kingpin.MustParse(app.Parse(os.Args[1:])) { 75 | case mit.FullCommand(): 76 | if string(*mitWebsite) == "" { 77 | mitCreate(string(*mitName), string(*mitSurname), fileName) 78 | } else { 79 | mitCreateWithSite(string(*mitName), string(*mitSurname), string(*mitWebsite), fileName) 80 | } 81 | case bsd2.FullCommand(): 82 | bsd2Create(string(*bsd2Name), string(*bsd2Surname), fileName) 83 | case bsd3.FullCommand(): 84 | bsd3Create(string(*bsd3Name), string(*bsd3Surname), fileName) 85 | case cc0.FullCommand(): 86 | cc0Create(fileName) 87 | case unlicense.FullCommand(): 88 | unlicenseCreate(fileName) 89 | case gpl2.FullCommand(): 90 | gpl2Create(fileName) 91 | case gpl3.FullCommand(): 92 | gpl3Create(fileName) 93 | case isc.FullCommand(): 94 | iscCreate(string(*iscName), string(*iscSurname), fileName) 95 | case wtfpl.FullCommand(): 96 | wtfplCreate(string(*wtfplName), string(*wtfplSurname), fileName) 97 | case boml.FullCommand(): 98 | bomlCreate(fileName, bool(*md)) 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /bsd.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | "strconv" 9 | "time" 10 | ) 11 | 12 | // bsd2Create creates the BSD 2-Clause license 13 | func bsd2Create(name string, surname string, fileName string) error { 14 | year, _, _ := time.Now().Date() 15 | fo, err := os.Create(fileName) 16 | if err != nil { 17 | log.Fatal(err) 18 | } 19 | defer fo.Close() 20 | 21 | BSD2 := "BSD 2-Clause License\n\n" + 22 | "Copyright (c) " + strconv.Itoa(year) + "-present, " + name + " " + surname + "\n" + 23 | "All rights reserved.\n\n" + 24 | "Redistribution and use in source and binary forms, with or without\n" + 25 | "modification, are permitted provided that the following conditions are met:\n\n" + 26 | "* Redistributions of source code must retain the above copyright notice, this\n" + 27 | " list of conditions and the following disclaimer.\n\n" + 28 | "* Redistributions in binary form must reproduce the above copyright notice,\n" + 29 | " this list of conditions and the following disclaimer in the documentation\n" + 30 | " and/or other materials provided with the distribution.\n\n" + 31 | "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n" + 32 | "AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" + 33 | "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n" + 34 | "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n" + 35 | "FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" + 36 | "DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n" + 37 | "SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n" + 38 | "CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n" + 39 | "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n" + 40 | "OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" 41 | 42 | ioutil.WriteFile(fileName, []byte(BSD2), 0644) 43 | fmt.Println("License was created") 44 | return nil 45 | } 46 | 47 | // bsd3Create creates the BSD 3-Clause license 48 | func bsd3Create(name string, surname string, fileName string) error { 49 | year, _, _ := time.Now().Date() 50 | fo, err := os.Create(fileName) 51 | if err != nil { 52 | log.Fatal(err) 53 | } 54 | defer fo.Close() 55 | 56 | BSD3 := "BSD 3-Clause License\n\n" + 57 | "Copyright (c) " + strconv.Itoa(year) + "-present, " + name + " " + surname + "\n" + 58 | "All rights reserved.\n\n" + 59 | "Redistribution and use in source and binary forms, with or without\n" + 60 | "modification, are permitted provided that the following conditions are met:\n\n" + 61 | "* Redistributions of source code must retain the above copyright notice, this\n" + 62 | " list of conditions and the following disclaimer.\n\n" + 63 | "* Redistributions in binary form must reproduce the above copyright notice,\n" + 64 | " this list of conditions and the following disclaimer in the documentation\n" + 65 | " and/or other materials provided with the distribution.\n\n" + 66 | "* Neither the name of the copyright holder nor the names of its\n" + 67 | " contributors may be used to endorse or promote products derived from\n" + 68 | " this software without specific prior written permission.\n\n" + 69 | "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n" + 70 | "AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" + 71 | "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n" + 72 | "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n" + 73 | "FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" + 74 | "DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n" + 75 | "SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n" + 76 | "CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n" + 77 | "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n" + 78 | "OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" 79 | 80 | ioutil.WriteFile(fileName, []byte(BSD3), 0644) 81 | fmt.Println("License was created") 82 | return nil 83 | } 84 | -------------------------------------------------------------------------------- /boml.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | ) 9 | 10 | // bomlCreate creates the Blue Oack Model license 11 | func bomlCreate(fileName string, isMD bool) error { 12 | fo, err := os.Create(fileName) 13 | if err != nil { 14 | log.Fatal(err) 15 | } 16 | defer fo.Close() 17 | 18 | mdBOML := "# Blue Oak Model License\n\n" + 19 | "Version 1.0.0\n\n" + 20 | "## Purpose\n\n" + 21 | "This license gives everyone as much permission to work with\n" + 22 | "this software as possible, while protecting contributors\n" + 23 | "from liability.\n\n" + 24 | "## Acceptance\n\n" + 25 | "In order to receive this license, you must agree to its\n" + 26 | "rules. The rules of this license are both obligations\n" + 27 | "under that agreement and conditions to your license.\n" + 28 | "You must not do anything with this software that triggers\n" + 29 | "a rule that you cannot or will not follow.\n\n" + 30 | "## Copyright\n\n" + 31 | "Each contributor licenses you to do everything with this\n" + 32 | "software that would otherwise infringe that contributor's\n" + 33 | "copyright in it.\n\n" + 34 | "## Notices\n\n" + 35 | "You must ensure that everyone who gets a copy of\n" + 36 | "any part of this software from you, with or without\n" + 37 | "changes, also gets the text of this license or a link to\n" + 38 | ".\n\n" + 39 | "## Excuse\n\n" + 40 | "If anyone notifies you in writing that you have not\n" + 41 | "complied with [Notices](#notices), you can keep your\n" + 42 | "license by taking all practical steps to comply within 30\n" + 43 | "days after the notice. If you do not do so, your license\n" + 44 | "ends immediately.\n\n" + 45 | "## Patent\n\n" + 46 | "Each contributor licenses you to do everything with this\n" + 47 | "software that would otherwise infringe any patent claims\n" + 48 | "they can license or become able to license.\n\n" + 49 | "## Reliability\n\n" + 50 | "No contributor can revoke this license.\n\n" + 51 | "## No Liability\n\n" + 52 | "***As far as the law allows, this software comes as is,\n" + 53 | "without any warranty or condition, and no contributor\n" + 54 | "will be liable to anyone for any damages related to this\n" + 55 | "software or this license, under any kind of legal claim.***\n" 56 | 57 | BOML := "Blue Oak Model License\n\n" + 58 | "Version 1.0.0\n\n" + 59 | "Purpose\n\n" + 60 | "This license gives everyone as much permission to work with\n" + 61 | "this software as possible, while protecting contributors\n" + 62 | "from liability.\n\n" + 63 | "Acceptance\n\n" + 64 | "In order to receive this license, you must agree to its\n" + 65 | "rules. The rules of this license are both obligations\n" + 66 | "under that agreement and conditions to your license.\n" + 67 | "You must not do anything with this software that triggers\n" + 68 | "a rule that you cannot or will not follow.\n\n" + 69 | "Copyright\n\n" + 70 | "Each contributor licenses you to do everything with this\n" + 71 | "software that would otherwise infringe that contributor's\n" + 72 | "copyright in it.\n\n" + 73 | "Notices\n\n" + 74 | "You must ensure that everyone who gets a copy of\n" + 75 | "any part of this software from you, with or without\n" + 76 | "changes, also gets the text of this license or a link to\n" + 77 | ".\n\n" + 78 | "Excuse\n\n" + 79 | "If anyone notifies you in writing that you have not\n" + 80 | "complied with Notices, you can keep your\n" + 81 | "license by taking all practical steps to comply within 30\n" + 82 | "days after the notice. If you do not do so, your license\n" + 83 | "ends immediately.\n\n" + 84 | "Patent\n\n" + 85 | "Each contributor licenses you to do everything with this\n" + 86 | "software that would otherwise infringe any patent claims\n" + 87 | "they can license or become able to license.\n\n" + 88 | "Reliability\n\n" + 89 | "No contributor can revoke this license.\n\n" + 90 | "No Liability\n\n" + 91 | "As far as the law allows, this software comes as is,\n" + 92 | "without any warranty or condition, and no contributor\n" + 93 | "will be liable to anyone for any damages related to this\n" + 94 | "software or this license, under any kind of legal claim.\n" 95 | 96 | if isMD { 97 | ioutil.WriteFile(fileName, []byte(mdBOML), 0644) 98 | } else { 99 | ioutil.WriteFile(fileName, []byte(BOML), 0644) 100 | } 101 | fmt.Println("License was created") 102 | return nil 103 | } 104 | -------------------------------------------------------------------------------- /cc0.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | ) 9 | 10 | // cc0Create creates the CC0 1.0 Universal license 11 | func cc0Create(fileName string) error { 12 | fo, err := os.Create(fileName) 13 | if err != nil { 14 | log.Fatal(err) 15 | } 16 | defer fo.Close() 17 | 18 | CC0 := "CC0 1.0 Universal\n\n" + 19 | "Statement of Purpose\n\n" + 20 | "The laws of most jurisdictions throughout the world automatically confer\n" + 21 | "exclusive Copyright and Related Rights (defined below) upon the creator and\n" + 22 | "subsequent owner(s) (each and all, an \"owner\") of an original work of\n" + 23 | "authorship and/or a database (each, a \"Work\").\n\n" + 24 | "Certain owners wish to permanently relinquish those rights to a Work for the\n" + 25 | "purpose of contributing to a commons of creative, cultural and scientific\n" + 26 | "works (\"Commons\") that the public can reliably and without fear of later\n" + 27 | "claims of infringement build upon, modify, incorporate in other works, reuse\n" + 28 | "and redistribute as freely as possible in any form whatsoever and for any\n" + 29 | "purposes, including without limitation commercial purposes. These owners may\n" + 30 | "contribute to the Commons to promote the ideal of a free culture and the\n" + 31 | "further production of creative, cultural and scientific works, or to gain\n" + 32 | "reputation or greater distribution for their Work in part through the use and\n" + 33 | "efforts of others.\n\n" + 34 | "For these and/or other purposes and motivations, and without any expectation\n" + 35 | "of additional consideration or compensation, the person associating CC0 with a\n" + 36 | "Work (the \"Affirmer\"), to the extent that he or she is an owner of Copyright\n" + 37 | "and Related Rights in the Work, voluntarily elects to apply CC0 to the Work" + 38 | "and publicly distribute the Work under its terms, with knowledge of his or her\n" + 39 | "Copyright and Related Rights in the Work and the meaning and intended legal\n" + 40 | "effect of CC0 on those rights.\n\n" + 41 | "1. Copyright and Related Rights. A Work made available under CC0 may be\n" + 42 | "protected by copyright and related or neighboring rights (\"Copyright and\n" + 43 | "Related Rights\"). Copyright and Related Rights include, but are not limited\n" + 44 | "to, the following:\n\n" + 45 | " i. the right to reproduce, adapt, distribute, perform, display, communicate,\n" + 46 | " and translate a Work;\n\n" + 47 | " ii. moral rights retained by the original author(s) and/or performer(s);\n\n" + 48 | " iii. publicity and privacy rights pertaining to a person's image or likeness\n" + 49 | " depicted in a Work;\n\n" + 50 | " iv. rights protecting against unfair competition in regards to a Work,\n" + 51 | " subject to the limitations in paragraph 4(a), below;\n\n" + 52 | " v. rights protecting the extraction, dissemination, use and reuse of data in\n" + 53 | " a Work;\n\n" + 54 | " vi. database rights (such as those arising under Directive 96/9/EC of the\n" + 55 | " European Parliament and of the Council of 11 March 1996 on the legal\n" + 56 | " protection of databases, and under any national implementation thereof,\n" + 57 | " including any amended or successor version of such directive); and\n\n" + 58 | " vii. other similar, equivalent or corresponding rights throughout the world\n" + 59 | " based on applicable law or treaty, and any national implementations thereof.\n\n" + 60 | "2. Waiver. To the greatest extent permitted by, but not in contravention of,\n" + 61 | "applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and\n" + 62 | "unconditionally waives, abandons, and surrenders all of Affirmer's Copyright\n" + 63 | "and Related Rights and associated claims and causes of action, whether now\n" + 64 | "known or unknown (including existing as well as future claims and causes of\n" + 65 | "action), in the Work (i) in all territories worldwide, (ii) for the maximum\n" + 66 | "duration provided by applicable law or treaty (including future time\n" + 67 | "extensions), (iii) in any current or future medium and for any number of\n" + 68 | "copies, and (iv) for any purpose whatsoever, including without limitation\n" + 69 | "commercial, advertising or promotional purposes (the \"Waiver\"). Affirmer makes\n" + 70 | "the Waiver for the benefit of each member of the public at large and to the\n" + 71 | "detriment of Affirmer's heirs and successors, fully intending that such Waiver\n" + 72 | "shall not be subject to revocation, rescission, cancellation, termination, or\n" + 73 | "any other legal or equitable action to disrupt the quiet enjoyment of the Work\n" + 74 | "by the public as contemplated by Affirmer's express Statement of Purpose.\n\n" + 75 | "3. Public License Fallback. Should any part of the Waiver for any reason be\n" + 76 | "judged legally invalid or ineffective under applicable law, then the Waiver\n" + 77 | "shall be preserved to the maximum extent permitted taking into account\n" + 78 | "Affirmer's express Statement of Purpose. In addition, to the extent the Waiver\n" + 79 | "is so judged Affirmer hereby grants to each affected person a royalty-free,\n" + 80 | "non transferable, non sublicensable, non exclusive, irrevocable and\n" + 81 | "unconditional license to exercise Affirmer's Copyright and Related Rights in\n" + 82 | "the Work (i) in all territories worldwide, (ii) for the maximum duration\n" + 83 | "provided by applicable law or treaty (including future time extensions), (iii)\n" + 84 | "in any current or future medium and for any number of copies, and (iv) for any\n" + 85 | "purpose whatsoever, including without limitation commercial, advertising or\n" + 86 | "promotional purposes (the \"License\"). The License shall be deemed effective as\n" + 87 | "of the date CC0 was applied by Affirmer to the Work. Should any part of the\n" + 88 | "License for any reason be judged legally invalid or ineffective under\n" + 89 | "applicable law, such partial invalidity or ineffectiveness shall not\n" + 90 | "invalidate the remainder of the License, and in such case Affirmer hereby\n" + 91 | "affirms that he or she will not (i) exercise any of his or her remaining\n" + 92 | "Copyright and Related Rights in the Work or (ii) assert any associated claims\n" + 93 | "and causes of action with respect to the Work, in either case contrary to\n" + 94 | "Affirmer's express Statement of Purpose.\n\n" + 95 | "4. Limitations and Disclaimers.\n\n" + 96 | " a. No trademark or patent rights held by Affirmer are waived, abandoned,\n" + 97 | " surrendered, licensed or otherwise affected by this document.\n\n" + 98 | " b. Affirmer offers the Work as-is and makes no representations or warranties\n" + 99 | " of any kind concerning the Work, express, implied, statutory or otherwise,\n" + 100 | " including without limitation warranties of title, merchantability, fitness\n" + 101 | " for a particular purpose, non infringement, or the absence of latent or\n" + 102 | " other defects, accuracy, or the present or absence of errors, whether or not\n" + 103 | " discoverable, all to the greatest extent permissible under applicable law.\n\n" + 104 | " c. Affirmer disclaims responsibility for clearing rights of other persons\n" + 105 | " that may apply to the Work or any use thereof, including without limitation\n" + 106 | " any person's Copyright and Related Rights in the Work. Further, Affirmer\n" + 107 | " disclaims responsibility for obtaining any necessary consents, permissions\n" + 108 | " or other rights required for any use of the Work.\n\n" + 109 | " d. Affirmer understands and acknowledges that Creative Commons is not a\n" + 110 | " party to this document and has no duty or obligation with respect to this\n" + 111 | " CC0 or use of the Work.\n\n" + 112 | "For more information, please see\n" + 113 | "\n" 114 | 115 | ioutil.WriteFile(fileName, []byte(CC0), 0644) 116 | fmt.Println("License was created") 117 | return nil 118 | } 119 | -------------------------------------------------------------------------------- /gpl.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | ) 9 | 10 | // gpl2Create creates the GNU General Public License version 2 11 | func gpl2Create(fileName string) error { 12 | fo, err := os.Create(fileName) 13 | if err != nil { 14 | log.Fatal(err) 15 | } 16 | defer fo.Close() 17 | 18 | GPL2 := " GNU GENERAL PUBLIC license\n" + 19 | " Version 2, June 1991\n\n" + 20 | " Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n" + 21 | " 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n" + 22 | " Everyone is permitted to copy and distribute verbatim copies\n" + 23 | " of this license document, but changing it is not allowed.\n\n" + 24 | " Preamble\n\n" + 25 | " The licenses for most software are designed to take away your\n" + 26 | "freedom to share and change it. By contrast, the GNU General Public\n" + 27 | "License is intended to guarantee your freedom to share and change free\n" + 28 | "software--to make sure the software is free for all its users. This\n" + 29 | "General Public License applies to most of the Free Software\n" + 30 | "Foundation's software and to any other program whose authors commit to\n" + 31 | "using it. (Some other Free Software Foundation software is covered by\n" + 32 | "the GNU Lesser General Public License instead.) You can apply it to\n" + 33 | "your programs, too.\n\n" + 34 | " When we speak of free software, we are referring to freedom, not\n" + 35 | "price. Our General Public Licenses are designed to make sure that you\n" + 36 | "have the freedom to distribute copies of free software (and charge for\n" + 37 | "this service if you wish), that you receive source code or can get it\n" + 38 | "if you want it, that you can change the software or use pieces of it\n" + 39 | "in new free programs; and that you know you can do these things.\n\n" + 40 | " To protect your rights, we need to make restrictions that forbid\n" + 41 | "anyone to deny you these rights or to ask you to surrender the rights.\n" + 42 | "These restrictions translate to certain responsibilities for you if you\n" + 43 | "distribute copies of the software, or if you modify it.\n\n" + 44 | " For example, if you distribute copies of such a program, whether\n" + 45 | "gratis or for a fee, you must give the recipients all the rights that\n" + 46 | "you have. You must make sure that they, too, receive or can get the\n" + 47 | "source code. And you must show them these terms so they know their\n" + 48 | "rights.\n\n" + 49 | " We protect your rights with two steps: (1) copyright the software, and\n" + 50 | "(2) offer you this license which gives you legal permission to copy,\n" + 51 | "distribute and/or modify the software.\n\n" + 52 | " Also, for each author's protection and ours, we want to make certain\n" + 53 | "that everyone understands that there is no warranty for this free\n" + 54 | "software. If the software is modified by someone else and passed on, we\n" + 55 | "want its recipients to know that what they have is not the original, so\n" + 56 | "that any problems introduced by others will not reflect on the original\n" + 57 | "authors' reputations.\n\n" + 58 | " Finally, any free program is threatened constantly by software\n" + 59 | "patents. We wish to avoid the danger that redistributors of a free\n" + 60 | "program will individually obtain patent licenses, in effect making the\n" + 61 | "program proprietary. To prevent this, we have made it clear that any\n" + 62 | "patent must be licensed for everyone's free use or not licensed at all.\n\n" + 63 | " The precise terms and conditions for copying, distribution and\n" + 64 | "modification follow.\n\n" + 65 | " GNU GENERAL PUBLIC license\n" + 66 | " TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n" + 67 | " 0. This License applies to any program or other work which contains\n" + 68 | "a notice placed by the copyright holder saying it may be distributed\n" + 69 | "under the terms of this General Public License. The \"Program\", below,\n" + 70 | "refers to any such program or work, and a \"work based on the Program\"\n" + 71 | "means either the Program or any derivative work under copyright law:\n" + 72 | "that is to say, a work containing the Program or a portion of it,\n" + 73 | "either verbatim or with modifications and/or translated into another\n" + 74 | "language. (Hereinafter, translation is included without limitation in\n" + 75 | "the term \"modification\".) Each licensee is addressed as \"you\".\n\n" + 76 | "Activities other than copying, distribution and modification are not\n" + 77 | "covered by this License; they are outside its scope. The act of\n" + 78 | "running the Program is not restricted, and the output from the Program\n" + 79 | "is covered only if its contents constitute a work based on the\n" + 80 | "Program (independent of having been made by running the Program).\n" + 81 | "Whether that is true depends on what the Program does.\n\n" + 82 | " 1. You may copy and distribute verbatim copies of the Program's\n" + 83 | "source code as you receive it, in any medium, provided that you\n" + 84 | "conspicuously and appropriately publish on each copy an appropriate\n" + 85 | "copyright notice and disclaimer of warranty; keep intact all the\n" + 86 | "notices that refer to this License and to the absence of any warranty;\n" + 87 | "and give any other recipients of the Program a copy of this License\n" + 88 | "along with the Program.\n\n" + 89 | "You may charge a fee for the physical act of transferring a copy, and\n" + 90 | "you may at your option offer warranty protection in exchange for a fee.\n\n" + 91 | " 2. You may modify your copy or copies of the Program or any portion\n" + 92 | "of it, thus forming a work based on the Program, and copy and\n" + 93 | "distribute such modifications or work under the terms of Section 1\n" + 94 | "above, provided that you also meet all of these conditions:\n\n" + 95 | " a) You must cause the modified files to carry prominent notices\n" + 96 | " stating that you changed the files and the date of any change.\n\n" + 97 | " b) You must cause any work that you distribute or publish, that in\n" + 98 | " whole or in part contains or is derived from the Program or any\n" + 99 | " part thereof, to be licensed as a whole at no charge to all third\n" + 100 | " parties under the terms of this License.\n\n" + 101 | " c) If the modified program normally reads commands interactively\n" + 102 | " when run, you must cause it, when started running for such\n" + 103 | " interactive use in the most ordinary way, to print or display an\n" + 104 | " announcement including an appropriate copyright notice and a\n" + 105 | " notice that there is no warranty (or else, saying that you provide\n" + 106 | " a warranty) and that users may redistribute the program under\n" + 107 | " these conditions, and telling the user how to view a copy of this\n" + 108 | " License. (Exception: if the Program itself is interactive but\n" + 109 | " does not normally print such an announcement, your work based on\n" + 110 | " the Program is not required to print an announcement.)\n\n" + 111 | "These requirements apply to the modified work as a whole. If\n" + 112 | "identifiable sections of that work are not derived from the Program,\n" + 113 | "and can be reasonably considered independent and separate works in\n" + 114 | "themselves, then this License, and its terms, do not apply to those\n" + 115 | "sections when you distribute them as separate works. But when you\n" + 116 | "distribute the same sections as part of a whole which is a work based\n" + 117 | "on the Program, the distribution of the whole must be on the terms of\n" + 118 | "this License, whose permissions for other licensees extend to the\n" + 119 | "entire whole, and thus to each and every part regardless of who wrote it.\n\n" + 120 | "Thus, it is not the intent of this section to claim rights or contest\n" + 121 | "your rights to work written entirely by you; rather, the intent is to\n" + 122 | "exercise the right to control the distribution of derivative or\n" + 123 | "collective works based on the Program.\n\n" + 124 | "In addition, mere aggregation of another work not based on the Program\n" + 125 | "with the Program (or with a work based on the Program) on a volume of\n" + 126 | "a storage or distribution medium does not bring the other work under\n" + 127 | "the scope of this License.\n\n" + 128 | " 3. You may copy and distribute the Program (or a work based on it,\n" + 129 | "under Section 2) in object code or executable form under the terms of\n" + 130 | "Sections 1 and 2 above provided that you also do one of the following:\n\n" + 131 | " a) Accompany it with the complete corresponding machine-readable\n" + 132 | " source code, which must be distributed under the terms of Sections\n" + 133 | " 1 and 2 above on a medium customarily used for software interchange; or,\n\n" + 134 | " b) Accompany it with a written offer, valid for at least three\n" + 135 | " years, to give any third party, for a charge no more than your\n" + 136 | " cost of physically performing source distribution, a complete\n" + 137 | " machine-readable copy of the corresponding source code, to be\n" + 138 | " distributed under the terms of Sections 1 and 2 above on a medium\n" + 139 | " customarily used for software interchange; or,\n\n" + 140 | " c) Accompany it with the information you received as to the offer\n" + 141 | " to distribute corresponding source code. (This alternative is\n" + 142 | " allowed only for noncommercial distribution and only if you\n" + 143 | " received the program in object code or executable form with such\n" + 144 | " an offer, in accord with Subsection b above.)\n\n" + 145 | "The source code for a work means the preferred form of the work for\n" + 146 | "making modifications to it. For an executable work, complete source\n" + 147 | "code means all the source code for all modules it contains, plus any\n" + 148 | "associated interface definition files, plus the scripts used to\n" + 149 | "control compilation and installation of the executable. However, as a\n" + 150 | "special exception, the source code distributed need not include\n" + 151 | "anything that is normally distributed (in either source or binary\n" + 152 | "form) with the major components (compiler, kernel, and so on) of the\n" + 153 | "operating system on which the executable runs, unless that component\n" + 154 | "itself accompanies the executable.\n\n" + 155 | "If distribution of executable or object code is made by offering\n" + 156 | "access to copy from a designated place, then offering equivalent\n" + 157 | "access to copy the source code from the same place counts as\n" + 158 | "distribution of the source code, even though third parties are not\n" + 159 | "compelled to copy the source along with the object code.\n\n" + 160 | " 4. You may not copy, modify, sublicense, or distribute the Program\n" + 161 | "except as expressly provided under this License. Any attempt\n" + 162 | "otherwise to copy, modify, sublicense or distribute the Program is\n" + 163 | "void, and will automatically terminate your rights under this License.\n" + 164 | "However, parties who have received copies, or rights, from you under\n" + 165 | "this License will not have their licenses terminated so long as such\n" + 166 | "parties remain in full compliance.\n\n" + 167 | " 5. You are not required to accept this License, since you have not\n" + 168 | "signed it. However, nothing else grants you permission to modify or\n" + 169 | "distribute the Program or its derivative works. These actions are\n" + 170 | "prohibited by law if you do not accept this License. Therefore, by\n" + 171 | "modifying or distributing the Program (or any work based on the\n" + 172 | "Program), you indicate your acceptance of this License to do so, and\n" + 173 | "all its terms and conditions for copying, distributing or modifying\n" + 174 | "the Program or works based on it.\n\n" + 175 | " 6. Each time you redistribute the Program (or any work based on the\n" + 176 | "Program), the recipient automatically receives a license from the\n" + 177 | "original licensor to copy, distribute or modify the Program subject to\n" + 178 | "these terms and conditions. You may not impose any further\n" + 179 | "restrictions on the recipients' exercise of the rights granted herein.\n" + 180 | "You are not responsible for enforcing compliance by third parties to\n" + 181 | "this License.\n\n" + 182 | " 7. If, as a consequence of a court judgment or allegation of patent\n" + 183 | "infringement or for any other reason (not limited to patent issues),\n" + 184 | "conditions are imposed on you (whether by court order, agreement or\n" + 185 | "otherwise) that contradict the conditions of this License, they do not\n" + 186 | "excuse you from the conditions of this License. If you cannot\n" + 187 | "distribute so as to satisfy simultaneously your obligations under this\n" + 188 | "License and any other pertinent obligations, then as a consequence you\n" + 189 | "may not distribute the Program at all. For example, if a patent\n" + 190 | "license would not permit royalty-free redistribution of the Program by\n" + 191 | "all those who receive copies directly or indirectly through you, then\n" + 192 | "the only way you could satisfy both it and this License would be to\n" + 193 | "refrain entirely from distribution of the Program.\n\n" + 194 | "If any portion of this section is held invalid or unenforceable under\n" + 195 | "any particular circumstance, the balance of the section is intended to\n" + 196 | "apply and the section as a whole is intended to apply in other\n" + 197 | "circumstances.\n\n" + 198 | "It is not the purpose of this section to induce you to infringe any\n" + 199 | "patents or other property right claims or to contest validity of any\n" + 200 | "such claims; this section has the sole purpose of protecting the\n" + 201 | "integrity of the free software distribution system, which is\n" + 202 | "implemented by public license practices. Many people have made\n" + 203 | "generous contributions to the wide range of software distributed\n" + 204 | "through that system in reliance on consistent application of that\n" + 205 | "system; it is up to the author/donor to decide if he or she is willing\n" + 206 | "to distribute software through any other system and a licensee cannot\n" + 207 | "impose that choice.\n\n" + 208 | "This section is intended to make thoroughly clear what is believed to\n" + 209 | "be a consequence of the rest of this License.\n\n" + 210 | " 8. If the distribution and/or use of the Program is restricted in\n" + 211 | "certain countries either by patents or by copyrighted interfaces, the\n" + 212 | "original copyright holder who places the Program under this License\n" + 213 | "may add an explicit geographical distribution limitation excluding\n" + 214 | "those countries, so that distribution is permitted only in or among\n" + 215 | "countries not thus excluded. In such case, this License incorporates\n" + 216 | "the limitation as if written in the body of this License.\n\n" + 217 | " 9. The Free Software Foundation may publish revised and/or new versions\n" + 218 | "of the General Public License from time to time. Such new versions will\n" + 219 | "be similar in spirit to the present version, but may differ in detail to\n" + 220 | "address new problems or concerns.\n\n" + 221 | "Each version is given a distinguishing version number. If the Program\n" + 222 | "specifies a version number of this License which applies to it and \"any\n" + 223 | "later version\", you have the option of following the terms and conditions\n" + 224 | "either of that version or of any later version published by the Free\n" + 225 | "Software Foundation. If the Program does not specify a version number of\n" + 226 | "this License, you may choose any version ever published by the Free Software\n" + 227 | "Foundation.\n\n" + 228 | " 10. If you wish to incorporate parts of the Program into other free\n" + 229 | "programs whose distribution conditions are different, write to the author\n" + 230 | "to ask for permission. For software which is copyrighted by the Free\n" + 231 | "Software Foundation, write to the Free Software Foundation; we sometimes\n" + 232 | "make exceptions for this. Our decision will be guided by the two goals\n" + 233 | "of preserving the free status of all derivatives of our free software and\n" + 234 | "of promoting the sharing and reuse of software generally.\n\n" + 235 | " NO WARRANTY\n\n" + 236 | " 11. BECAUSE THE PROGRAM IS licenseD FREE OF CHARGE, THERE IS NO WARRANTY\n" + 237 | "FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\n" + 238 | "OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\n" + 239 | "PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\n" + 240 | "OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n" + 241 | "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\n" + 242 | "TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\n" + 243 | "PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\n" + 244 | "REPAIR OR CORRECTION.\n\n" + 245 | " 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n" + 246 | "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\n" + 247 | "REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\n" + 248 | "INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\n" + 249 | "OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\n" + 250 | "TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\n" + 251 | "YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\n" + 252 | "PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\n" + 253 | "POSSIBILITY OF SUCH DAMAGES.\n\n" + 254 | " END OF TERMS AND CONDITIONS\n\n" + 255 | " How to Apply These Terms to Your New Programs\n\n" + 256 | " If you develop a new program, and you want it to be of the greatest\n" + 257 | "possible use to the public, the best way to achieve this is to make it\n" + 258 | "free software which everyone can redistribute and change under these terms.\n\n" + 259 | " To do so, attach the following notices to the program. It is safest\n" + 260 | "to attach them to the start of each source file to most effectively\n" + 261 | "convey the exclusion of warranty; and each file should have at least\n" + 262 | "the \"copyright\" line and a pointer to where the full notice is found.\n\n" + 263 | " \n" + 264 | " Copyright (C) \n\n" + 265 | " This program is free software; you can redistribute it and/or modify\n" + 266 | " it under the terms of the GNU General Public License as published by\n" + 267 | " the Free Software Foundation; either version 2 of the License, or\n" + 268 | " (at your option) any later version.\n\n" + 269 | " This program is distributed in the hope that it will be useful,\n" + 270 | " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + 271 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + 272 | " GNU General Public License for more details.\n\n" + 273 | " You should have received a copy of the GNU General Public License along\n" + 274 | " with this program; if not, write to the Free Software Foundation, Inc.,\n" + 275 | " 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n" + 276 | "Also add information on how to contact you by electronic and paper mail.\n\n" + 277 | "If the program is interactive, make it output a short notice like this\n" + 278 | "when it starts in an interactive mode:\n\n" + 279 | " Gnomovision version 69, Copyright (C) year name of author\n" + 280 | " Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n" + 281 | " This is free software, and you are welcome to redistribute it\n" + 282 | " under certain conditions; type `show c' for details.\n\n" + 283 | "The hypothetical commands `show w' and `show c' should show the appropriate\n" + 284 | "parts of the General Public License. Of course, the commands you use may\n" + 285 | "be called something other than `show w' and `show c'; they could even be\n" + 286 | "mouse-clicks or menu items--whatever suits your program.\n\n" + 287 | "You should also get your employer (if you work as a programmer) or your\n" + 288 | "school, if any, to sign a \"copyright disclaimer\" for the program, if\n" + 289 | "necessary. Here is a sample; alter the names:\n\n" + 290 | " Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n" + 291 | " `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n" + 292 | " , 1 April 1989\n" + 293 | " Ty Coon, President of Vice\n\n" + 294 | "This General Public License does not permit incorporating your program into\n" + 295 | "proprietary programs. If your program is a subroutine library, you may\n" + 296 | "consider it more useful to permit linking proprietary applications with the\n" + 297 | "library. If this is what you want to do, use the GNU Lesser General\n" + 298 | "Public License instead of this License.\n" 299 | 300 | ioutil.WriteFile(fileName, []byte(GPL2), 0644) 301 | fmt.Println("License was created") 302 | return nil 303 | } 304 | 305 | // gpl3Create creates the GNU General Public License version 3 306 | func gpl3Create(fileName string) error { 307 | fo, err := os.Create(fileName) 308 | if err != nil { 309 | log.Fatal(err) 310 | } 311 | defer fo.Close() 312 | 313 | GPL3 := " GNU GENERAL PUBLIC license\n" + 314 | " Version 3, 29 June 2007\n\n" + 315 | " Copyright (C) 2007 Free Software Foundation, Inc. \n" + 316 | " Everyone is permitted to copy and distribute verbatim copies\n" + 317 | " of this license document, but changing it is not allowed.\n\n" + 318 | " Preamble\n\n" + 319 | " The GNU General Public License is a free, copyleft license for\n" + 320 | "software and other kinds of works.\n\n" + 321 | " The licenses for most software and other practical works are designed\n" + 322 | "to take away your freedom to share and change the works. By contrast,\n" + 323 | "the GNU General Public License is intended to guarantee your freedom to\n" + 324 | "share and change all versions of a program--to make sure it remains free\n" + 325 | "software for all its users. We, the Free Software Foundation, use the\n" + 326 | "GNU General Public License for most of our software; it applies also to\n" + 327 | "any other work released this way by its authors. You can apply it to\n" + 328 | "your programs, too.\n\n" + 329 | " When we speak of free software, we are referring to freedom, not\n" + 330 | "price. Our General Public Licenses are designed to make sure that you\n" + 331 | "have the freedom to distribute copies of free software (and charge for\n" + 332 | "them if you wish), that you receive source code or can get it if you\n" + 333 | "want it, that you can change the software or use pieces of it in new\n" + 334 | "free programs, and that you know you can do these things.\n\n" + 335 | " To protect your rights, we need to prevent others from denying you\n" + 336 | "these rights or asking you to surrender the rights. Therefore, you have\n" + 337 | "certain responsibilities if you distribute copies of the software, or if\n" + 338 | "you modify it: responsibilities to respect the freedom of others.\n\n" + 339 | " For example, if you distribute copies of such a program, whether\n" + 340 | "gratis or for a fee, you must pass on to the recipients the same\n" + 341 | "freedoms that you received. You must make sure that they, too, receive\n" + 342 | "or can get the source code. And you must show them these terms so they\n" + 343 | "know their rights.\n\n" + 344 | " Developers that use the GNU GPL protect your rights with two steps:\n" + 345 | "(1) assert copyright on the software, and (2) offer you this License\n" + 346 | "giving you legal permission to copy, distribute and/or modify it.\n\n" + 347 | " For the developers' and authors' protection, the GPL clearly explains\n" + 348 | "that there is no warranty for this free software. For both users' and\n" + 349 | "authors' sake, the GPL requires that modified versions be marked as\n" + 350 | "changed, so that their problems will not be attributed erroneously to\n" + 351 | "authors of previous versions.\n\n" + 352 | " Some devices are designed to deny users access to install or run\n" + 353 | "modified versions of the software inside them, although the manufacturer\n" + 354 | "can do so. This is fundamentally incompatible with the aim of\n" + 355 | "protecting users' freedom to change the software. The systematic\n" + 356 | "pattern of such abuse occurs in the area of products for individuals to\n" + 357 | "use, which is precisely where it is most unacceptable. Therefore, we\n" + 358 | "have designed this version of the GPL to prohibit the practice for those\n" + 359 | "products. If such problems arise substantially in other domains, we\n" + 360 | "stand ready to extend this provision to those domains in future versions\n" + 361 | "of the GPL, as needed to protect the freedom of users.\n\n" + 362 | " Finally, every program is threatened constantly by software patents.\n" + 363 | "States should not allow patents to restrict development and use of\n" + 364 | "software on general-purpose computers, but in those that do, we wish to\n" + 365 | "avoid the special danger that patents applied to a free program could\n" + 366 | "make it effectively proprietary. To prevent this, the GPL assures that\n" + 367 | "patents cannot be used to render the program non-free.\n\n" + 368 | " The precise terms and conditions for copying, distribution and\n" + 369 | "modification follow.\n\n" + 370 | " TERMS AND CONDITIONS\n\n" + 371 | " 0. Definitions.\n\n" + 372 | " \"This License\" refers to version 3 of the GNU General Public License.\n\n" + 373 | " \"Copyright\" also means copyright-like laws that apply to other kinds of\n" + 374 | "works, such as semiconductor masks.\n\n" + 375 | " \"The Program\" refers to any copyrightable work licensed under this\n" + 376 | "License. Each licensee is addressed as \"you\". \"Licensees\" and\n" + 377 | "\"recipients\" may be individuals or organizations.\n\n" + 378 | " To \"modify\" a work means to copy from or adapt all or part of the work\n" + 379 | "in a fashion requiring copyright permission, other than the making of an\n" + 380 | "exact copy. The resulting work is called a \"modified version\" of the\n" + 381 | "earlier work or a work \"based on\" the earlier work.\n\n" + 382 | " A \"covered work\" means either the unmodified Program or a work based\n" + 383 | "on the Program.\n\n" + 384 | " To \"propagate\" a work means to do anything with it that, without\n" + 385 | "permission, would make you directly or secondarily liable for\n" + 386 | "infringement under applicable copyright law, except executing it on a\n" + 387 | "computer or modifying a private copy. Propagation includes copying,\n" + 388 | "distribution (with or without modification), making available to the\n" + 389 | "public, and in some countries other activities as well.\n\n" + 390 | " To \"convey\" a work means any kind of propagation that enables other\n" + 391 | "parties to make or receive copies. Mere interaction with a user through\n" + 392 | "a computer network, with no transfer of a copy, is not conveying.\n\n" + 393 | " An interactive user interface displays \"Appropriate Legal Notices\"\n" + 394 | "to the extent that it includes a convenient and prominently visible\n" + 395 | "feature that (1) displays an appropriate copyright notice, and (2)\n" + 396 | "tells the user that there is no warranty for the work (except to the\n" + 397 | "extent that warranties are provided), that licensees may convey the\n" + 398 | "work under this License, and how to view a copy of this License. If\n" + 399 | "the interface presents a list of user commands or options, such as a\n" + 400 | "menu, a prominent item in the list meets this criterion.\n\n" + 401 | " 1. Source Code.\n\n" + 402 | " The \"source code\" for a work means the preferred form of the work\n" + 403 | "for making modifications to it. \"Object code\" means any non-source\n" + 404 | "form of a work.\n\n" + 405 | " A \"Standard Interface\" means an interface that either is an official\n" + 406 | "standard defined by a recognized standards body, or, in the case of\n" + 407 | "interfaces specified for a particular programming language, one that\n" + 408 | "is widely used among developers working in that language.\n\n" + 409 | " The \"System Libraries\" of an executable work include anything, other\n" + 410 | "than the work as a whole, that (a) is included in the normal form of\n" + 411 | "packaging a Major Component, but which is not part of that Major\n" + 412 | "Component, and (b) serves only to enable use of the work with that\n" + 413 | "Major Component, or to implement a Standard Interface for which an\n" + 414 | "implementation is available to the public in source code form. A\n" + 415 | "\"Major Component\", in this context, means a major essential component\n" + 416 | "(kernel, window system, and so on) of the specific operating system\n" + 417 | "(if any) on which the executable work runs, or a compiler used to\n" + 418 | "produce the work, or an object code interpreter used to run it.\n\n" + 419 | " The \"Corresponding Source\" for a work in object code form means all\n" + 420 | "the source code needed to generate, install, and (for an executable\n" + 421 | "work) run the object code and to modify the work, including scripts to\n" + 422 | "control those activities. However, it does not include the work's\n" + 423 | "System Libraries, or general-purpose tools or generally available free\n" + 424 | "programs which are used unmodified in performing those activities but\n" + 425 | "which are not part of the work. For example, Corresponding Source\n" + 426 | "includes interface definition files associated with source files for\n" + 427 | "the work, and the source code for shared libraries and dynamically\n" + 428 | "linked subprograms that the work is specifically designed to require,\n" + 429 | "such as by intimate data communication or control flow between those\n" + 430 | "subprograms and other parts of the work.\n\n" + 431 | " The Corresponding Source need not include anything that users\n" + 432 | "can regenerate automatically from other parts of the Corresponding\n" + 433 | "Source.\n\n" + 434 | " The Corresponding Source for a work in source code form is that\n" + 435 | "same work.\n\n" + 436 | " 2. Basic Permissions.\n\n" + 437 | " All rights granted under this License are granted for the term of\n" + 438 | "copyright on the Program, and are irrevocable provided the stated\n" + 439 | "conditions are met. This License explicitly affirms your unlimited\n" + 440 | "permission to run the unmodified Program. The output from running a\n" + 441 | "covered work is covered by this License only if the output, given its\n" + 442 | "content, constitutes a covered work. This License acknowledges your\n" + 443 | "rights of fair use or other equivalent, as provided by copyright law.\n\n" + 444 | " You may make, run and propagate covered works that you do not\n" + 445 | "convey, without conditions so long as your license otherwise remains\n" + 446 | "in force. You may convey covered works to others for the sole purpose\n" + 447 | "of having them make modifications exclusively for you, or provide you\n" + 448 | "with facilities for running those works, provided that you comply with\n" + 449 | "the terms of this License in conveying all material for which you do\n" + 450 | "not control copyright. Those thus making or running the covered works\n" + 451 | "for you must do so exclusively on your behalf, under your direction\n" + 452 | "and control, on terms that prohibit them from making any copies of\n" + 453 | "your copyrighted material outside their relationship with you.\n\n" + 454 | " Conveying under any other circumstances is permitted solely under\n" + 455 | "the conditions stated below. Sublicensing is not allowed; section 10\n" + 456 | "makes it unnecessary.\n\n" + 457 | " 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n" + 458 | " No covered work shall be deemed part of an effective technological\n" + 459 | "measure under any applicable law fulfilling obligations under article\n" + 460 | "11 of the WIPO copyright treaty adopted on 20 December 1996, or\n" + 461 | "similar laws prohibiting or restricting circumvention of such\n" + 462 | "measures.\n\n" + 463 | " When you convey a covered work, you waive any legal power to forbid\n" + 464 | "circumvention of technological measures to the extent such circumvention\n" + 465 | "is effected by exercising rights under this License with respect to\n" + 466 | "the covered work, and you disclaim any intention to limit operation or\n" + 467 | "modification of the work as a means of enforcing, against the work's\n" + 468 | "users, your or third parties' legal rights to forbid circumvention of\n" + 469 | "technological measures.\n\n" + 470 | " 4. Conveying Verbatim Copies.\n\n" + 471 | " You may convey verbatim copies of the Program's source code as you\n" + 472 | "receive it, in any medium, provided that you conspicuously and\n" + 473 | "appropriately publish on each copy an appropriate copyright notice;\n" + 474 | "keep intact all notices stating that this License and any\n" + 475 | "non-permissive terms added in accord with section 7 apply to the code;\n" + 476 | "keep intact all notices of the absence of any warranty; and give all\n" + 477 | "recipients a copy of this License along with the Program.\n\n" + 478 | " You may charge any price or no price for each copy that you convey,\n" + 479 | "and you may offer support or warranty protection for a fee.\n\n" + 480 | " 5. Conveying Modified Source Versions.\n\n" + 481 | " You may convey a work based on the Program, or the modifications to\n" + 482 | "produce it from the Program, in the form of source code under the\n" + 483 | "terms of section 4, provided that you also meet all of these conditions:\n\n" + 484 | " a) The work must carry prominent notices stating that you modified\n" + 485 | " it, and giving a relevant date.\n\n" + 486 | " b) The work must carry prominent notices stating that it is\n" + 487 | " released under this License and any conditions added under section\n" + 488 | " 7. This requirement modifies the requirement in section 4 to\n" + 489 | " \"keep intact all notices\".\n\n" + 490 | " c) You must license the entire work, as a whole, under this\n" + 491 | " License to anyone who comes into possession of a copy. This\n" + 492 | " License will therefore apply, along with any applicable section 7\n" + 493 | " additional terms, to the whole of the work, and all its parts,\n" + 494 | " regardless of how they are packaged. This License gives no\n" + 495 | " permission to license the work in any other way, but it does not\n" + 496 | " invalidate such permission if you have separately received it.\n\n" + 497 | " d) If the work has interactive user interfaces, each must display\n" + 498 | " Appropriate Legal Notices; however, if the Program has interactive\n" + 499 | " interfaces that do not display Appropriate Legal Notices, your\n" + 500 | " work need not make them do so.\n\n" + 501 | " A compilation of a covered work with other separate and independent\n" + 502 | "works, which are not by their nature extensions of the covered work,\n" + 503 | "and which are not combined with it such as to form a larger program,\n" + 504 | "in or on a volume of a storage or distribution medium, is called an\n" + 505 | "\"aggregate\" if the compilation and its resulting copyright are not\n" + 506 | "used to limit the access or legal rights of the compilation's users\n" + 507 | "beyond what the individual works permit. Inclusion of a covered work\n" + 508 | "in an aggregate does not cause this License to apply to the other\n" + 509 | "parts of the aggregate.\n\n" + 510 | " 6. Conveying Non-Source Forms.\n\n" + 511 | " You may convey a covered work in object code form under the terms\n" + 512 | "of sections 4 and 5, provided that you also convey the\n" + 513 | "machine-readable Corresponding Source under the terms of this License,\n" + 514 | "in one of these ways:\n\n" + 515 | " a) Convey the object code in, or embodied in, a physical product\n" + 516 | " (including a physical distribution medium), accompanied by the\n" + 517 | " Corresponding Source fixed on a durable physical medium\n" + 518 | " customarily used for software interchange.\n\n" + 519 | " b) Convey the object code in, or embodied in, a physical product\n" + 520 | " (including a physical distribution medium), accompanied by a\n" + 521 | " written offer, valid for at least three years and valid for as\n" + 522 | " long as you offer spare parts or customer support for that product\n" + 523 | " model, to give anyone who possesses the object code either (1) a\n" + 524 | " copy of the Corresponding Source for all the software in the\n" + 525 | " product that is covered by this License, on a durable physical\n" + 526 | " medium customarily used for software interchange, for a price no\n" + 527 | " more than your reasonable cost of physically performing this\n" + 528 | " conveying of source, or (2) access to copy the\n" + 529 | " Corresponding Source from a network server at no charge.\n\n" + 530 | " c) Convey individual copies of the object code with a copy of the\n" + 531 | " written offer to provide the Corresponding Source. This\n" + 532 | " alternative is allowed only occasionally and noncommercially, and\n" + 533 | " only if you received the object code with such an offer, in accord\n" + 534 | " with subsection 6b.\n\n" + 535 | " d) Convey the object code by offering access from a designated\n" + 536 | " place (gratis or for a charge), and offer equivalent access to the\n" + 537 | " Corresponding Source in the same way through the same place at no\n" + 538 | " further charge. You need not require recipients to copy the\n" + 539 | " Corresponding Source along with the object code. If the place to\n" + 540 | " copy the object code is a network server, the Corresponding Source\n" + 541 | " may be on a different server (operated by you or a third party)\n" + 542 | " that supports equivalent copying facilities, provided you maintain\n" + 543 | " clear directions next to the object code saying where to find the\n" + 544 | " Corresponding Source. Regardless of what server hosts the\n" + 545 | " Corresponding Source, you remain obligated to ensure that it is\n" + 546 | " available for as long as needed to satisfy these requirements.\n\n" + 547 | " e) Convey the object code using peer-to-peer transmission, provided\n" + 548 | " you inform other peers where the object code and Corresponding\n" + 549 | " Source of the work are being offered to the general public at no\n" + 550 | " charge under subsection 6d.\n\n" + 551 | " A separable portion of the object code, whose source code is excluded\n" + 552 | "from the Corresponding Source as a System Library, need not be\n" + 553 | "included in conveying the object code work.\n\n" + 554 | " A \"User Product\" is either (1) a \"consumer product\", which means any\n" + 555 | "tangible personal property which is normally used for personal, family,\n" + 556 | "or household purposes, or (2) anything designed or sold for incorporation\n" + 557 | "into a dwelling. In determining whether a product is a consumer product,\n" + 558 | "doubtful cases shall be resolved in favor of coverage. For a particular\n" + 559 | "product received by a particular user, \"normally used\" refers to a\n" + 560 | "typical or common use of that class of product, regardless of the status\n" + 561 | "of the particular user or of the way in which the particular user\n" + 562 | "actually uses, or expects or is expected to use, the product. A product\n" + 563 | "is a consumer product regardless of whether the product has substantial\n" + 564 | "commercial, industrial or non-consumer uses, unless such uses represent\n" + 565 | "the only significant mode of use of the product.\n\n" + 566 | " \"Installation Information\" for a User Product means any methods,\n" + 567 | "procedures, authorization keys, or other information required to install\n" + 568 | "and execute modified versions of a covered work in that User Product from\n" + 569 | "a modified version of its Corresponding Source. The information must\n" + 570 | "suffice to ensure that the continued functioning of the modified object\n" + 571 | "code is in no case prevented or interfered with solely because\n" + 572 | "modification has been made.\n\n" + 573 | " If you convey an object code work under this section in, or with, or\n" + 574 | "specifically for use in, a User Product, and the conveying occurs as\n" + 575 | "part of a transaction in which the right of possession and use of the\n" + 576 | "User Product is transferred to the recipient in perpetuity or for a\n" + 577 | "fixed term (regardless of how the transaction is characterized), the\n" + 578 | "Corresponding Source conveyed under this section must be accompanied\n" + 579 | "by the Installation Information. But this requirement does not apply\n" + 580 | "if neither you nor any third party retains the ability to install\n" + 581 | "modified object code on the User Product (for example, the work has\n" + 582 | "been installed in ROM).\n\n" + 583 | " The requirement to provide Installation Information does not include a\n" + 584 | "requirement to continue to provide support service, warranty, or updates\n" + 585 | "for a work that has been modified or installed by the recipient, or for\n" + 586 | "the User Product in which it has been modified or installed. Access to a\n" + 587 | "network may be denied when the modification itself materially and\n" + 588 | "adversely affects the operation of the network or violates the rules and\n" + 589 | "protocols for communication across the network.\n\n" + 590 | " Corresponding Source conveyed, and Installation Information provided,\n" + 591 | "in accord with this section must be in a format that is publicly\n" + 592 | "documented (and with an implementation available to the public in\n" + 593 | "source code form), and must require no special password or key for\n" + 594 | "unpacking, reading or copying.\n\n" + 595 | " 7. Additional Terms.\n\n" + 596 | " \"Additional permissions\" are terms that supplement the terms of this\n" + 597 | "License by making exceptions from one or more of its conditions.\n" + 598 | "Additional permissions that are applicable to the entire Program shall\n" + 599 | "be treated as though they were included in this License, to the extent\n" + 600 | "that they are valid under applicable law. If additional permissions\n" + 601 | "apply only to part of the Program, that part may be used separately\n" + 602 | "under those permissions, but the entire Program remains governed by\n" + 603 | "this License without regard to the additional permissions.\n\n" + 604 | " When you convey a copy of a covered work, you may at your option\n" + 605 | "remove any additional permissions from that copy, or from any part of\n" + 606 | "it. (Additional permissions may be written to require their own\n" + 607 | "removal in certain cases when you modify the work.) You may place\n" + 608 | "additional permissions on material, added by you to a covered work,\n" + 609 | "for which you have or can give appropriate copyright permission.\n\n" + 610 | " Notwithstanding any other provision of this License, for material you\n" + 611 | "add to a covered work, you may (if authorized by the copyright holders of\n" + 612 | "that material) supplement the terms of this License with terms:\n\n" + 613 | " a) Disclaiming warranty or limiting liability differently from the\n" + 614 | " terms of sections 15 and 16 of this License; or\n\n" + 615 | " b) Requiring preservation of specified reasonable legal notices or\n" + 616 | " author attributions in that material or in the Appropriate Legal\n" + 617 | " Notices displayed by works containing it; or\n\n" + 618 | " c) Prohibiting misrepresentation of the origin of that material, or\n" + 619 | " requiring that modified versions of such material be marked in\n" + 620 | " reasonable ways as different from the original version; or\n\n" + 621 | " d) Limiting the use for publicity purposes of names of licensors or\n" + 622 | " authors of the material; or\n\n" + 623 | " e) Declining to grant rights under trademark law for use of some\n" + 624 | " trade names, trademarks, or service marks; or\n\n" + 625 | " f) Requiring indemnification of licensors and authors of that\n" + 626 | " material by anyone who conveys the material (or modified versions of\n" + 627 | " it) with contractual assumptions of liability to the recipient, for\n" + 628 | " any liability that these contractual assumptions directly impose on\n" + 629 | " those licensors and authors.\n\n" + 630 | " All other non-permissive additional terms are considered \"further\n" + 631 | "restrictions\" within the meaning of section 10. If the Program as you\n" + 632 | "received it, or any part of it, contains a notice stating that it is\n" + 633 | "governed by this License along with a term that is a further\n" + 634 | "restriction, you may remove that term. If a license document contains\n" + 635 | "a further restriction but permits relicensing or conveying under this\n" + 636 | "License, you may add to a covered work material governed by the terms\n" + 637 | "of that license document, provided that the further restriction does\n" + 638 | "not survive such relicensing or conveying.\n\n" + 639 | " If you add terms to a covered work in accord with this section, you\n" + 640 | "must place, in the relevant source files, a statement of the\n" + 641 | "additional terms that apply to those files, or a notice indicating\n" + 642 | "where to find the applicable terms.\n\n" + 643 | " Additional terms, permissive or non-permissive, may be stated in the\n" + 644 | "form of a separately written license, or stated as exceptions;\n" + 645 | "the above requirements apply either way.\n\n" + 646 | " 8. Termination.\n\n" + 647 | " You may not propagate or modify a covered work except as expressly\n" + 648 | "provided under this License. Any attempt otherwise to propagate or\n" + 649 | "modify it is void, and will automatically terminate your rights under\n" + 650 | "this License (including any patent licenses granted under the third\n" + 651 | "paragraph of section 11).\n\n" + 652 | " However, if you cease all violation of this License, then your\n" + 653 | "license from a particular copyright holder is reinstated (a)\n" + 654 | "provisionally, unless and until the copyright holder explicitly and\n" + 655 | "finally terminates your license, and (b) permanently, if the copyright\n" + 656 | "holder fails to notify you of the violation by some reasonable means\n" + 657 | "prior to 60 days after the cessation.\n\n" + 658 | " Moreover, your license from a particular copyright holder is\n" + 659 | "reinstated permanently if the copyright holder notifies you of the\n" + 660 | "violation by some reasonable means, this is the first time you have\n" + 661 | "received notice of violation of this License (for any work) from that\n" + 662 | "copyright holder, and you cure the violation prior to 30 days after\n" + 663 | "your receipt of the notice.\n\n" + 664 | " Termination of your rights under this section does not terminate the\n" + 665 | "licenses of parties who have received copies or rights from you under\n" + 666 | "this License. If your rights have been terminated and not permanently\n" + 667 | "reinstated, you do not qualify to receive new licenses for the same\n" + 668 | "material under section 10.\n\n" + 669 | " 9. Acceptance Not Required for Having Copies.\n\n" + 670 | " You are not required to accept this License in order to receive or\n" + 671 | "run a copy of the Program. Ancillary propagation of a covered work\n" + 672 | "occurring solely as a consequence of using peer-to-peer transmission\n" + 673 | "to receive a copy likewise does not require acceptance. However,\n" + 674 | "nothing other than this License grants you permission to propagate or\n" + 675 | "modify any covered work. These actions infringe copyright if you do\n" + 676 | "not accept this License. Therefore, by modifying or propagating a\n" + 677 | "covered work, you indicate your acceptance of this License to do so.\n\n" + 678 | " 10. Automatic Licensing of Downstream Recipients.\n\n" + 679 | " Each time you convey a covered work, the recipient automatically\n" + 680 | "receives a license from the original licensors, to run, modify and\n" + 681 | "propagate that work, subject to this License. You are not responsible\n" + 682 | "for enforcing compliance by third parties with this License.\n\n" + 683 | " An \"entity transaction\" is a transaction transferring control of an\n" + 684 | "organization, or substantially all assets of one, or subdividing an\n" + 685 | "organization, or merging organizations. If propagation of a covered\n" + 686 | "work results from an entity transaction, each party to that\n" + 687 | "transaction who receives a copy of the work also receives whatever\n" + 688 | "licenses to the work the party's predecessor in interest had or could\n" + 689 | "give under the previous paragraph, plus a right to possession of the\n" + 690 | "Corresponding Source of the work from the predecessor in interest, if\n" + 691 | "the predecessor has it or can get it with reasonable efforts.\n\n" + 692 | " You may not impose any further restrictions on the exercise of the\n" + 693 | "rights granted or affirmed under this License. For example, you may\n" + 694 | "not impose a license fee, royalty, or other charge for exercise of\n" + 695 | "rights granted under this License, and you may not initiate litigation\n" + 696 | "(including a cross-claim or counterclaim in a lawsuit) alleging that\n" + 697 | "any patent claim is infringed by making, using, selling, offering for\n" + 698 | "sale, or importing the Program or any portion of it.\n\n" + 699 | " 11. Patents.\n\n" + 700 | " A \"contributor\" is a copyright holder who authorizes use under this\n" + 701 | "License of the Program or a work on which the Program is based. The\n" + 702 | "work thus licensed is called the contributor's \"contributor version\".\n\n" + 703 | " A contributor's \"essential patent claims\" are all patent claims\n" + 704 | "owned or controlled by the contributor, whether already acquired or\n" + 705 | "hereafter acquired, that would be infringed by some manner, permitted\n" + 706 | "by this License, of making, using, or selling its contributor version,\n" + 707 | "but do not include claims that would be infringed only as a\n" + 708 | "consequence of further modification of the contributor version. For\n" + 709 | "purposes of this definition, \"control\" includes the right to grant\n" + 710 | "patent sublicenses in a manner consistent with the requirements of\n" + 711 | "this License.\n\n" + 712 | " Each contributor grants you a non-exclusive, worldwide, royalty-free\n" + 713 | "patent license under the contributor's essential patent claims, to\n" + 714 | "make, use, sell, offer for sale, import and otherwise run, modify and\n" + 715 | "propagate the contents of its contributor version.\n\n" + 716 | " In the following three paragraphs, a \"patent license\" is any express\n" + 717 | "agreement or commitment, however denominated, not to enforce a patent\n" + 718 | "(such as an express permission to practice a patent or covenant not to\n" + 719 | "sue for patent infringement). To \"grant\" such a patent license to a\n" + 720 | "party means to make such an agreement or commitment not to enforce a\n" + 721 | "patent against the party.\n\n" + 722 | " If you convey a covered work, knowingly relying on a patent license,\n" + 723 | "and the Corresponding Source of the work is not available for anyone\n" + 724 | "to copy, free of charge and under the terms of this License, through a\n" + 725 | "publicly available network server or other readily accessible means,\n" + 726 | "then you must either (1) cause the Corresponding Source to be so\n" + 727 | "available, or (2) arrange to deprive yourself of the benefit of the\n" + 728 | "patent license for this particular work, or (3) arrange, in a manner\n" + 729 | "consistent with the requirements of this License, to extend the patent\n" + 730 | "license to downstream recipients. \"Knowingly relying\" means you have\n" + 731 | "actual knowledge that, but for the patent license, your conveying the\n" + 732 | "covered work in a country, or your recipient's use of the covered work\n" + 733 | "in a country, would infringe one or more identifiable patents in that\n" + 734 | "country that you have reason to believe are valid.\n\n" + 735 | " If, pursuant to or in connection with a single transaction or\n" + 736 | "arrangement, you convey, or propagate by procuring conveyance of, a\n" + 737 | "covered work, and grant a patent license to some of the parties\n" + 738 | "receiving the covered work authorizing them to use, propagate, modify\n" + 739 | "or convey a specific copy of the covered work, then the patent license\n" + 740 | "you grant is automatically extended to all recipients of the covered\n" + 741 | "work and works based on it.\n\n" + 742 | " A patent license is \"discriminatory\" if it does not include within\n" + 743 | "the scope of its coverage, prohibits the exercise of, or is\n" + 744 | "conditioned on the non-exercise of one or more of the rights that are\n" + 745 | "specifically granted under this License. You may not convey a covered\n" + 746 | "work if you are a party to an arrangement with a third party that is\n" + 747 | "in the business of distributing software, under which you make payment\n" + 748 | "to the third party based on the extent of your activity of conveying\n" + 749 | "the work, and under which the third party grants, to any of the\n" + 750 | "parties who would receive the covered work from you, a discriminatory\n" + 751 | "patent license (a) in connection with copies of the covered work\n" + 752 | "conveyed by you (or copies made from those copies), or (b) primarily\n" + 753 | "for and in connection with specific products or compilations that\n" + 754 | "contain the covered work, unless you entered into that arrangement,\n" + 755 | "or that patent license was granted, prior to 28 March 2007.\n\n" + 756 | " Nothing in this License shall be construed as excluding or limiting\n" + 757 | "any implied license or other defenses to infringement that may\n" + 758 | "otherwise be available to you under applicable patent law.\n\n" + 759 | " 12. No Surrender of Others' Freedom.\n\n" + 760 | " If conditions are imposed on you (whether by court order, agreement or\n" + 761 | "otherwise) that contradict the conditions of this License, they do not\n" + 762 | "excuse you from the conditions of this License. If you cannot convey a\n" + 763 | "covered work so as to satisfy simultaneously your obligations under this\n" + 764 | "License and any other pertinent obligations, then as a consequence you may\n" + 765 | "not convey it at all. For example, if you agree to terms that obligate you\n" + 766 | "to collect a royalty for further conveying from those to whom you convey\n" + 767 | "the Program, the only way you could satisfy both those terms and this\n" + 768 | "License would be to refrain entirely from conveying the Program.\n\n" + 769 | " 13. Use with the GNU Affero General Public License.\n\n" + 770 | " Notwithstanding any other provision of this License, you have\n" + 771 | "permission to link or combine any covered work with a work licensed\n" + 772 | "under version 3 of the GNU Affero General Public License into a single\n" + 773 | "combined work, and to convey the resulting work. The terms of this\n" + 774 | "License will continue to apply to the part which is the covered work,\n" + 775 | "but the special requirements of the GNU Affero General Public License,\n" + 776 | "section 13, concerning interaction through a network will apply to the\n" + 777 | "combination as such.\n\n" + 778 | " 14. Revised Versions of this License.\n\n" + 779 | " The Free Software Foundation may publish revised and/or new versions of\n" + 780 | "the GNU General Public License from time to time. Such new versions will\n" + 781 | "be similar in spirit to the present version, but may differ in detail to\n" + 782 | "address new problems or concerns.\n\n" + 783 | " Each version is given a distinguishing version number. If the\n" + 784 | "Program specifies that a certain numbered version of the GNU General\n" + 785 | "Public License \"or any later version\" applies to it, you have the\n" + 786 | "option of following the terms and conditions either of that numbered\n" + 787 | "version or of any later version published by the Free Software\n" + 788 | "Foundation. If the Program does not specify a version number of the\n" + 789 | "GNU General Public License, you may choose any version ever published\n" + 790 | "by the Free Software Foundation.\n\n" + 791 | " If the Program specifies that a proxy can decide which future\n" + 792 | "versions of the GNU General Public License can be used, that proxy's\n" + 793 | "public statement of acceptance of a version permanently authorizes you\n" + 794 | "to choose that version for the Program.\n\n" + 795 | " Later license versions may give you additional or different\n" + 796 | "permissions. However, no additional obligations are imposed on any\n" + 797 | "author or copyright holder as a result of your choosing to follow a\n" + 798 | "later version.\n\n" + 799 | " 15. Disclaimer of Warranty.\n\n" + 800 | " THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\n" + 801 | "APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\n" + 802 | "HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\n" + 803 | "OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\n" + 804 | "THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n" + 805 | "PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\n" + 806 | "IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\n" + 807 | "ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n" + 808 | " 16. Limitation of Liability.\n\n" + 809 | " IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n" + 810 | "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\n" + 811 | "THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\n" + 812 | "GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\n" + 813 | "USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\n" + 814 | "DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\n" + 815 | "PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\n" + 816 | "EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\n" + 817 | "SUCH DAMAGES.\n\n" + 818 | " 17. Interpretation of Sections 15 and 16.\n\n" + 819 | " If the disclaimer of warranty and limitation of liability provided\n" + 820 | "above cannot be given local legal effect according to their terms,\n" + 821 | "reviewing courts shall apply local law that most closely approximates\n" + 822 | "an absolute waiver of all civil liability in connection with the\n" + 823 | "Program, unless a warranty or assumption of liability accompanies a\n" + 824 | "copy of the Program in return for a fee.\n\n" + 825 | " END OF TERMS AND CONDITIONS\n\n" + 826 | " How to Apply These Terms to Your New Programs\n\n" + 827 | " If you develop a new program, and you want it to be of the greatest\n" + 828 | "possible use to the public, the best way to achieve this is to make it\n" + 829 | "free software which everyone can redistribute and change under these terms.\n\n" + 830 | " To do so, attach the following notices to the program. It is safest\n" + 831 | "to attach them to the start of each source file to most effectively\n" + 832 | "state the exclusion of warranty; and each file should have at least\n" + 833 | "the \"copyright\" line and a pointer to where the full notice is found.\n\n" + 834 | " \n" + 835 | " Copyright (C) \n\n" + 836 | " This program is free software: you can redistribute it and/or modify\n" + 837 | " it under the terms of the GNU General Public License as published by\n" + 838 | " the Free Software Foundation, either version 3 of the License, or\n" + 839 | " (at your option) any later version.\n\n" + 840 | " This program is distributed in the hope that it will be useful,\n" + 841 | " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + 842 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + 843 | " GNU General Public License for more details.\n\n" + 844 | " You should have received a copy of the GNU General Public License\n" + 845 | " along with this program. If not, see \n\n" + 846 | "Also add information on how to contact you by electronic and paper mail.\n\n" + 847 | " If the program does terminal interaction, make it output a short\n" + 848 | "notice like this when it starts in an interactive mode:\n\n" + 849 | " Copyright (C) \n" + 850 | " This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n" + 851 | " This is free software, and you are welcome to redistribute it\n" + 852 | " under certain conditions; type `show c' for details.\n\n" + 853 | "The hypothetical commands `show w' and `show c' should show the appropriate\n" + 854 | "parts of the General Public License. Of course, your program's commands\n" + 855 | "might be different; for a GUI interface, you would use an \"about box\".\n\n" + 856 | " You should also get your employer (if you work as a programmer) or school,\n" + 857 | "if any, to sign a \"copyright disclaimer\" for the program, if necessary.\n" + 858 | "For more information on this, and how to apply and follow the GNU GPL, see\n" + 859 | ".\n\n" + 860 | " The GNU General Public License does not permit incorporating your program\n" + 861 | "into proprietary programs. If your program is a subroutine library, you\n" + 862 | "may consider it more useful to permit linking proprietary applications with\n" + 863 | "the library. If this is what you want to do, use the GNU Lesser General\n" + 864 | "Public License instead of this License. But first, please read\n" + 865 | ".\n" 866 | 867 | ioutil.WriteFile(fileName, []byte(GPL3), 0644) 868 | fmt.Println("License was created") 869 | return nil 870 | } 871 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # License Up 2 | 3 | > Create a license quickly 4 | 5 | - [Install](#install) 6 | - [Usage](#usage) 7 | - [MIT License](#mit-license) 8 | - [BSD License](#bsd-license) 9 | - [2-Clause](#2-clause) 10 | - [3-Clause](#3-clause) 11 | - [CC0 License](#cc0-license) 12 | - [Unlicense License](#unlicense-license) 13 | - [GPL](#gpl) 14 | - [Version 2](#version-2) 15 | - [Version 3](#version-3) 16 | - [ISC License](#isc-license) 17 | - [WTFPL License](#wtfpl-license) 18 | - [Blue Oak Model License](#blue-oak-model-license) 19 | - [Contributing](#contributing) 20 | 21 | ## Install 22 | 23 | ```Bash 24 | go get -u github.com/nikitavoloboev/license-up 25 | ``` 26 | 27 | ## Usage 28 | 29 | Use it in the directory where you want to create the `license` file. 30 | 31 | Note that you can also create a `license.md` file instead by passing in a `--md` flag. 32 | 33 | ### MIT License 34 | 35 | To create [MIT license](https://spdx.org/licenses/MIT.html), run: 36 | 37 | ```Bash 38 | license-up mit [] 39 | ``` 40 | 41 | Where `` is optional. Here is a working example of it. 42 | 43 | ```Bash 44 | license-up mit Nikita Voloboev nikiv.dev 45 | ``` 46 | 47 | Will create a file `license` with following content: 48 | 49 |
Click to show content 50 | 51 | ```Markdown 52 | MIT License 53 | 54 | Copyright (c) 2019-present, Nikita Voloboev (nikiv.dev) 55 | 56 | Permission is hereby granted, free of charge, to any person obtaining a copy 57 | of this software and associated documentation files (the "Software"), to deal 58 | in the Software without restriction, including without limitation the rights 59 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 60 | copies of the Software, and to permit persons to whom the Software is 61 | furnished to do so, subject to the following conditions: 62 | 63 | The above copyright notice and this permission notice shall be included in all 64 | copies or substantial portions of the Software. 65 | 66 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 67 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 68 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 69 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 70 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 71 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 72 | SOFTWARE. 73 | ``` 74 | 75 |
76 | 77 |
78 | 79 | If you wish, you can create an [alias](http://tldp.org/LDP/abs/html/aliases.html) to simplify this. For example I have this alias that I use: 80 | 81 | ```Bash 82 | alias mit='license-up mit Nikita Voloboev nikiv.dev' 83 | ``` 84 | 85 | ### BSD License 86 | 87 | #### 2-Clause 88 | 89 | To create a [BSD 2-Clause license](https://spdx.org/licenses/BSD-2-Clause.html), run: 90 | 91 | ```Bash 92 | license-up bsd2 93 | ``` 94 | 95 | Here is a working example of it. 96 | 97 | ```Bash 98 | license-up bsd2 Nikita Voloboev 99 | ``` 100 | 101 | Will create a file `license` with following content: 102 | 103 |
Click to show content 104 | 105 | ```Markdown 106 | BSD 2-Clause License 107 | 108 | Copyright (c) 2019-present, Nikita Voloboev 109 | All rights reserved. 110 | 111 | Redistribution and use in source and binary forms, with or without 112 | modification, are permitted provided that the following conditions are met: 113 | 114 | * Redistributions of source code must retain the above copyright notice, this 115 | list of conditions and the following disclaimer. 116 | 117 | * Redistributions in binary form must reproduce the above copyright notice, 118 | this list of conditions and the following disclaimer in the documentation 119 | and/or other materials provided with the distribution. 120 | 121 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 122 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 123 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 124 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 125 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 126 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 127 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 128 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 129 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 130 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 131 | ``` 132 | 133 |
134 | 135 |
136 | 137 | As an alias: 138 | 139 | ```Bash 140 | alias bsd2='license-up bsd2 Nikita Voloboev' 141 | ``` 142 | 143 | #### 3-Clause 144 | 145 | To create a [BSD 3-Clause license](https://spdx.org/licenses/BSD-3-Clause.html), run: 146 | 147 | ```Bash 148 | license-up bsd3 149 | ``` 150 | 151 | Here is a working example of it. 152 | 153 | ```Bash 154 | license-up bsd3 Nikita Voloboev 155 | ``` 156 | 157 | Will create a file `license` with following content: 158 | 159 |
Click to show content 160 | 161 | ```Markdown 162 | BSD 3-Clause License 163 | 164 | Copyright (c) 2019-present, Nikita Voloboev 165 | All rights reserved. 166 | 167 | Redistribution and use in source and binary forms, with or without 168 | modification, are permitted provided that the following conditions are met: 169 | 170 | * Redistributions of source code must retain the above copyright notice, this 171 | list of conditions and the following disclaimer. 172 | 173 | * Redistributions in binary form must reproduce the above copyright notice, 174 | this list of conditions and the following disclaimer in the documentation 175 | and/or other materials provided with the distribution. 176 | 177 | * Neither the name of the copyright holder nor the names of its 178 | contributors may be used to endorse or promote products derived from 179 | this software without specific prior written permission. 180 | 181 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 182 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 183 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 184 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 185 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 186 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 187 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 188 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 189 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 190 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 191 | ``` 192 | 193 |
194 | 195 |
196 | 197 | As an alias: 198 | 199 | ```Bash 200 | alias bsd3='license-up bsd3 Nikita Voloboev' 201 | ``` 202 | 203 | Or, if you prefer: 204 | 205 | ```Bash 206 | alias bsd='license-up bsd3 Nikita Voloboev' 207 | ``` 208 | 209 | ### CC0 License 210 | 211 | To create a [CC0 license](https://spdx.org/licenses/CC0-1.0.html), run: 212 | 213 | ```Bash 214 | license-up cc0 215 | ``` 216 | 217 | Here is a working example of it. 218 | 219 | ```Bash 220 | license-up cc0 221 | ``` 222 | 223 | Will create a file `license` with following content: 224 | 225 |
Click to show content 226 | 227 | ```Markdown 228 | CC0 1.0 Universal 229 | 230 | Statement of Purpose 231 | 232 | The laws of most jurisdictions throughout the world automatically confer 233 | exclusive Copyright and Related Rights (defined below) upon the creator and 234 | subsequent owner(s) (each and all, an "owner") of an original work of 235 | authorship and/or a database (each, a "Work"). 236 | 237 | Certain owners wish to permanently relinquish those rights to a Work for the 238 | purpose of contributing to a commons of creative, cultural and scientific 239 | works ("Commons") that the public can reliably and without fear of later 240 | claims of infringement build upon, modify, incorporate in other works, reuse 241 | and redistribute as freely as possible in any form whatsoever and for any 242 | purposes, including without limitation commercial purposes. These owners may 243 | contribute to the Commons to promote the ideal of a free culture and the 244 | further production of creative, cultural and scientific works, or to gain 245 | reputation or greater distribution for their Work in part through the use and 246 | efforts of others. 247 | 248 | For these and/or other purposes and motivations, and without any expectation 249 | of additional consideration or compensation, the person associating CC0 with a 250 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 251 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 252 | and publicly distribute the Work under its terms, with knowledge of his or her 253 | Copyright and Related Rights in the Work and the meaning and intended legal 254 | effect of CC0 on those rights. 255 | 256 | 1. Copyright and Related Rights. A Work made available under CC0 may be 257 | protected by copyright and related or neighboring rights ("Copyright and 258 | Related Rights"). Copyright and Related Rights include, but are not limited 259 | to, the following: 260 | 261 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 262 | and translate a Work; 263 | 264 | ii. moral rights retained by the original author(s) and/or performer(s); 265 | 266 | iii. publicity and privacy rights pertaining to a person's image or likeness 267 | depicted in a Work; 268 | 269 | iv. rights protecting against unfair competition in regards to a Work, 270 | subject to the limitations in paragraph 4(a), below; 271 | 272 | v. rights protecting the extraction, dissemination, use and reuse of data in 273 | a Work; 274 | 275 | vi. database rights (such as those arising under Directive 96/9/EC of the 276 | European Parliament and of the Council of 11 March 1996 on the legal 277 | protection of databases, and under any national implementation thereof, 278 | including any amended or successor version of such directive); and 279 | 280 | vii. other similar, equivalent or corresponding rights throughout the world 281 | based on applicable law or treaty, and any national implementations thereof. 282 | 283 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 284 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 285 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 286 | and Related Rights and associated claims and causes of action, whether now 287 | known or unknown (including existing as well as future claims and causes of 288 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 289 | duration provided by applicable law or treaty (including future time 290 | extensions), (iii) in any current or future medium and for any number of 291 | copies, and (iv) for any purpose whatsoever, including without limitation 292 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 293 | the Waiver for the benefit of each member of the public at large and to the 294 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 295 | shall not be subject to revocation, rescission, cancellation, termination, or 296 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 297 | by the public as contemplated by Affirmer's express Statement of Purpose. 298 | 299 | 3. Public License Fallback. Should any part of the Waiver for any reason be 300 | judged legally invalid or ineffective under applicable law, then the Waiver 301 | shall be preserved to the maximum extent permitted taking into account 302 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 303 | is so judged Affirmer hereby grants to each affected person a royalty-free, 304 | non transferable, non sublicensable, non exclusive, irrevocable and 305 | unconditional license to exercise Affirmer's Copyright and Related Rights in 306 | the Work (i) in all territories worldwide, (ii) for the maximum duration 307 | provided by applicable law or treaty (including future time extensions), (iii) 308 | in any current or future medium and for any number of copies, and (iv) for any 309 | purpose whatsoever, including without limitation commercial, advertising or 310 | promotional purposes (the "License"). The License shall be deemed effective as 311 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 312 | License for any reason be judged legally invalid or ineffective under 313 | applicable law, such partial invalidity or ineffectiveness shall not 314 | invalidate the remainder of the License, and in such case Affirmer hereby 315 | affirms that he or she will not (i) exercise any of his or her remaining 316 | Copyright and Related Rights in the Work or (ii) assert any associated claims 317 | and causes of action with respect to the Work, in either case contrary to 318 | Affirmer's express Statement of Purpose. 319 | 320 | 4. Limitations and Disclaimers. 321 | 322 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 323 | surrendered, licensed or otherwise affected by this document. 324 | 325 | b. Affirmer offers the Work as-is and makes no representations or warranties 326 | of any kind concerning the Work, express, implied, statutory or otherwise, 327 | including without limitation warranties of title, merchantability, fitness 328 | for a particular purpose, non infringement, or the absence of latent or 329 | other defects, accuracy, or the present or absence of errors, whether or not 330 | discoverable, all to the greatest extent permissible under applicable law. 331 | 332 | c. Affirmer disclaims responsibility for clearing rights of other persons 333 | that may apply to the Work or any use thereof, including without limitation 334 | any person's Copyright and Related Rights in the Work. Further, Affirmer 335 | disclaims responsibility for obtaining any necessary consents, permissions 336 | or other rights required for any use of the Work. 337 | 338 | d. Affirmer understands and acknowledges that Creative Commons is not a 339 | party to this document and has no duty or obligation with respect to this 340 | CC0 or use of the Work. 341 | 342 | For more information, please see 343 | 344 | ``` 345 | 346 |
347 | 348 |
349 | 350 | As an alias: 351 | 352 | ```Bash 353 | alias cc0='license-up cc0' 354 | ``` 355 | 356 | ### Unlicense License 357 | 358 | To create an [Unlicense license](https://spdx.org/licenses/Unlicense.html), run: 359 | 360 | ```Bash 361 | license-up unlicense 362 | ``` 363 | 364 | Here is a working example of it. 365 | 366 | ```Bash 367 | license-up unlicense 368 | ``` 369 | 370 | Will create a file `license` with following content: 371 | 372 |
Click to show content 373 | 374 | ```Markdown 375 | This is free and unencumbered software released into the public domain. 376 | 377 | Anyone is free to copy, modify, publish, use, compile, sell, or 378 | distribute this software, either in source code form or as a compiled 379 | binary, for any purpose, commercial or non-commercial, and by any 380 | means. 381 | 382 | In jurisdictions that recognize copyright laws, the author or authors 383 | of this software dedicate any and all copyright interest in the 384 | software to the public domain. We make this dedication for the benefit 385 | of the public at large and to the detriment of our heirs and 386 | successors. We intend this dedication to be an overt act of 387 | relinquishment in perpetuity of all present and future rights to this 388 | software under copyright law. 389 | 390 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 391 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 392 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 393 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 394 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 395 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 396 | OTHER DEALINGS IN THE SOFTWARE. 397 | 398 | For more information, please refer to 399 | ``` 400 | 401 |
402 | 403 |
404 | 405 | As an alias: 406 | 407 | ```Bash 408 | alias unlicense='license-up unlicense' 409 | ``` 410 | 411 | ### GPL 412 | 413 | #### Version 2 414 | 415 | To create a [GNU General Public License version 2](https://spdx.org/licenses/GPL-2.0-only.html), run: 416 | 417 | ```Bash 418 | license-up gpl2 419 | ``` 420 | 421 | Here is a working example of it. 422 | 423 | ```Bash 424 | license-up gpl2 425 | ``` 426 | 427 | Will create a file `license` with following content: 428 | 429 |
Click to show content 430 | 431 | ```Markdown 432 | GNU GENERAL PUBLIC license 433 | Version 2, June 1991 434 | 435 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 436 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 437 | Everyone is permitted to copy and distribute verbatim copies 438 | of this license document, but changing it is not allowed. 439 | 440 | Preamble 441 | 442 | The licenses for most software are designed to take away your 443 | freedom to share and change it. By contrast, the GNU General Public 444 | License is intended to guarantee your freedom to share and change free 445 | software--to make sure the software is free for all its users. This 446 | General Public License applies to most of the Free Software 447 | Foundation's software and to any other program whose authors commit to 448 | using it. (Some other Free Software Foundation software is covered by 449 | the GNU Lesser General Public License instead.) You can apply it to 450 | your programs, too. 451 | 452 | When we speak of free software, we are referring to freedom, not 453 | price. Our General Public Licenses are designed to make sure that you 454 | have the freedom to distribute copies of free software (and charge for 455 | this service if you wish), that you receive source code or can get it 456 | if you want it, that you can change the software or use pieces of it 457 | in new free programs; and that you know you can do these things. 458 | 459 | To protect your rights, we need to make restrictions that forbid 460 | anyone to deny you these rights or to ask you to surrender the rights. 461 | These restrictions translate to certain responsibilities for you if you 462 | distribute copies of the software, or if you modify it. 463 | 464 | For example, if you distribute copies of such a program, whether 465 | gratis or for a fee, you must give the recipients all the rights that 466 | you have. You must make sure that they, too, receive or can get the 467 | source code. And you must show them these terms so they know their 468 | rights. 469 | 470 | We protect your rights with two steps: (1) copyright the software, and 471 | (2) offer you this license which gives you legal permission to copy, 472 | distribute and/or modify the software. 473 | 474 | Also, for each author's protection and ours, we want to make certain 475 | that everyone understands that there is no warranty for this free 476 | software. If the software is modified by someone else and passed on, we 477 | want its recipients to know that what they have is not the original, so 478 | that any problems introduced by others will not reflect on the original 479 | authors' reputations. 480 | 481 | Finally, any free program is threatened constantly by software 482 | patents. We wish to avoid the danger that redistributors of a free 483 | program will individually obtain patent licenses, in effect making the 484 | program proprietary. To prevent this, we have made it clear that any 485 | patent must be licensed for everyone's free use or not licensed at all. 486 | 487 | The precise terms and conditions for copying, distribution and 488 | modification follow. 489 | 490 | GNU GENERAL PUBLIC license 491 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 492 | 493 | 0. This License applies to any program or other work which contains 494 | a notice placed by the copyright holder saying it may be distributed 495 | under the terms of this General Public License. The "Program", below, 496 | refers to any such program or work, and a "work based on the Program" 497 | means either the Program or any derivative work under copyright law: 498 | that is to say, a work containing the Program or a portion of it, 499 | either verbatim or with modifications and/or translated into another 500 | language. (Hereinafter, translation is included without limitation in 501 | the term "modification".) Each licensee is addressed as "you". 502 | 503 | Activities other than copying, distribution and modification are not 504 | covered by this License; they are outside its scope. The act of 505 | running the Program is not restricted, and the output from the Program 506 | is covered only if its contents constitute a work based on the 507 | Program (independent of having been made by running the Program). 508 | Whether that is true depends on what the Program does. 509 | 510 | 1. You may copy and distribute verbatim copies of the Program's 511 | source code as you receive it, in any medium, provided that you 512 | conspicuously and appropriately publish on each copy an appropriate 513 | copyright notice and disclaimer of warranty; keep intact all the 514 | notices that refer to this License and to the absence of any warranty; 515 | and give any other recipients of the Program a copy of this License 516 | along with the Program. 517 | 518 | You may charge a fee for the physical act of transferring a copy, and 519 | you may at your option offer warranty protection in exchange for a fee. 520 | 521 | 2. You may modify your copy or copies of the Program or any portion 522 | of it, thus forming a work based on the Program, and copy and 523 | distribute such modifications or work under the terms of Section 1 524 | above, provided that you also meet all of these conditions: 525 | 526 | a) You must cause the modified files to carry prominent notices 527 | stating that you changed the files and the date of any change. 528 | 529 | b) You must cause any work that you distribute or publish, that in 530 | whole or in part contains or is derived from the Program or any 531 | part thereof, to be licensed as a whole at no charge to all third 532 | parties under the terms of this License. 533 | 534 | c) If the modified program normally reads commands interactively 535 | when run, you must cause it, when started running for such 536 | interactive use in the most ordinary way, to print or display an 537 | announcement including an appropriate copyright notice and a 538 | notice that there is no warranty (or else, saying that you provide 539 | a warranty) and that users may redistribute the program under 540 | these conditions, and telling the user how to view a copy of this 541 | License. (Exception: if the Program itself is interactive but 542 | does not normally print such an announcement, your work based on 543 | the Program is not required to print an announcement.) 544 | 545 | These requirements apply to the modified work as a whole. If 546 | identifiable sections of that work are not derived from the Program, 547 | and can be reasonably considered independent and separate works in 548 | themselves, then this License, and its terms, do not apply to those 549 | sections when you distribute them as separate works. But when you 550 | distribute the same sections as part of a whole which is a work based 551 | on the Program, the distribution of the whole must be on the terms of 552 | this License, whose permissions for other licensees extend to the 553 | entire whole, and thus to each and every part regardless of who wrote it. 554 | 555 | Thus, it is not the intent of this section to claim rights or contest 556 | your rights to work written entirely by you; rather, the intent is to 557 | exercise the right to control the distribution of derivative or 558 | collective works based on the Program. 559 | 560 | In addition, mere aggregation of another work not based on the Program 561 | with the Program (or with a work based on the Program) on a volume of 562 | a storage or distribution medium does not bring the other work under 563 | the scope of this License. 564 | 565 | 3. You may copy and distribute the Program (or a work based on it, 566 | under Section 2) in object code or executable form under the terms of 567 | Sections 1 and 2 above provided that you also do one of the following: 568 | 569 | a) Accompany it with the complete corresponding machine-readable 570 | source code, which must be distributed under the terms of Sections 571 | 1 and 2 above on a medium customarily used for software interchange; or, 572 | 573 | b) Accompany it with a written offer, valid for at least three 574 | years, to give any third party, for a charge no more than your 575 | cost of physically performing source distribution, a complete 576 | machine-readable copy of the corresponding source code, to be 577 | distributed under the terms of Sections 1 and 2 above on a medium 578 | customarily used for software interchange; or, 579 | 580 | c) Accompany it with the information you received as to the offer 581 | to distribute corresponding source code. (This alternative is 582 | allowed only for noncommercial distribution and only if you 583 | received the program in object code or executable form with such 584 | an offer, in accord with Subsection b above.) 585 | 586 | The source code for a work means the preferred form of the work for 587 | making modifications to it. For an executable work, complete source 588 | code means all the source code for all modules it contains, plus any 589 | associated interface definition files, plus the scripts used to 590 | control compilation and installation of the executable. However, as a 591 | special exception, the source code distributed need not include 592 | anything that is normally distributed (in either source or binary 593 | form) with the major components (compiler, kernel, and so on) of the 594 | operating system on which the executable runs, unless that component 595 | itself accompanies the executable. 596 | 597 | If distribution of executable or object code is made by offering 598 | access to copy from a designated place, then offering equivalent 599 | access to copy the source code from the same place counts as 600 | distribution of the source code, even though third parties are not 601 | compelled to copy the source along with the object code. 602 | 603 | 4. You may not copy, modify, sublicense, or distribute the Program 604 | except as expressly provided under this License. Any attempt 605 | otherwise to copy, modify, sublicense or distribute the Program is 606 | void, and will automatically terminate your rights under this License. 607 | However, parties who have received copies, or rights, from you under 608 | this License will not have their licenses terminated so long as such 609 | parties remain in full compliance. 610 | 611 | 5. You are not required to accept this License, since you have not 612 | signed it. However, nothing else grants you permission to modify or 613 | distribute the Program or its derivative works. These actions are 614 | prohibited by law if you do not accept this License. Therefore, by 615 | modifying or distributing the Program (or any work based on the 616 | Program), you indicate your acceptance of this License to do so, and 617 | all its terms and conditions for copying, distributing or modifying 618 | the Program or works based on it. 619 | 620 | 6. Each time you redistribute the Program (or any work based on the 621 | Program), the recipient automatically receives a license from the 622 | original licensor to copy, distribute or modify the Program subject to 623 | these terms and conditions. You may not impose any further 624 | restrictions on the recipients' exercise of the rights granted herein. 625 | You are not responsible for enforcing compliance by third parties to 626 | this License. 627 | 628 | 7. If, as a consequence of a court judgment or allegation of patent 629 | infringement or for any other reason (not limited to patent issues), 630 | conditions are imposed on you (whether by court order, agreement or 631 | otherwise) that contradict the conditions of this License, they do not 632 | excuse you from the conditions of this License. If you cannot 633 | distribute so as to satisfy simultaneously your obligations under this 634 | License and any other pertinent obligations, then as a consequence you 635 | may not distribute the Program at all. For example, if a patent 636 | license would not permit royalty-free redistribution of the Program by 637 | all those who receive copies directly or indirectly through you, then 638 | the only way you could satisfy both it and this License would be to 639 | refrain entirely from distribution of the Program. 640 | 641 | If any portion of this section is held invalid or unenforceable under 642 | any particular circumstance, the balance of the section is intended to 643 | apply and the section as a whole is intended to apply in other 644 | circumstances. 645 | 646 | It is not the purpose of this section to induce you to infringe any 647 | patents or other property right claims or to contest validity of any 648 | such claims; this section has the sole purpose of protecting the 649 | integrity of the free software distribution system, which is 650 | implemented by public license practices. Many people have made 651 | generous contributions to the wide range of software distributed 652 | through that system in reliance on consistent application of that 653 | system; it is up to the author/donor to decide if he or she is willing 654 | to distribute software through any other system and a licensee cannot 655 | impose that choice. 656 | 657 | This section is intended to make thoroughly clear what is believed to 658 | be a consequence of the rest of this License. 659 | 660 | 8. If the distribution and/or use of the Program is restricted in 661 | certain countries either by patents or by copyrighted interfaces, the 662 | original copyright holder who places the Program under this License 663 | may add an explicit geographical distribution limitation excluding 664 | those countries, so that distribution is permitted only in or among 665 | countries not thus excluded. In such case, this License incorporates 666 | the limitation as if written in the body of this License. 667 | 668 | 9. The Free Software Foundation may publish revised and/or new versions 669 | of the General Public License from time to time. Such new versions will 670 | be similar in spirit to the present version, but may differ in detail to 671 | address new problems or concerns. 672 | 673 | Each version is given a distinguishing version number. If the Program 674 | specifies a version number of this License which applies to it and "any 675 | later version", you have the option of following the terms and conditions 676 | either of that version or of any later version published by the Free 677 | Software Foundation. If the Program does not specify a version number of 678 | this License, you may choose any version ever published by the Free Software 679 | Foundation. 680 | 681 | 10. If you wish to incorporate parts of the Program into other free 682 | programs whose distribution conditions are different, write to the author 683 | to ask for permission. For software which is copyrighted by the Free 684 | Software Foundation, write to the Free Software Foundation; we sometimes 685 | make exceptions for this. Our decision will be guided by the two goals 686 | of preserving the free status of all derivatives of our free software and 687 | of promoting the sharing and reuse of software generally. 688 | 689 | NO WARRANTY 690 | 691 | 11. BECAUSE THE PROGRAM IS licenseD FREE OF CHARGE, THERE IS NO WARRANTY 692 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 693 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 694 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 695 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 696 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 697 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 698 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 699 | REPAIR OR CORRECTION. 700 | 701 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 702 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 703 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 704 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 705 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 706 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 707 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 708 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 709 | POSSIBILITY OF SUCH DAMAGES. 710 | 711 | END OF TERMS AND CONDITIONS 712 | 713 | How to Apply These Terms to Your New Programs 714 | 715 | If you develop a new program, and you want it to be of the greatest 716 | possible use to the public, the best way to achieve this is to make it 717 | free software which everyone can redistribute and change under these terms. 718 | 719 | To do so, attach the following notices to the program. It is safest 720 | to attach them to the start of each source file to most effectively 721 | convey the exclusion of warranty; and each file should have at least 722 | the "copyright" line and a pointer to where the full notice is found. 723 | 724 | 725 | Copyright (C) 726 | 727 | This program is free software; you can redistribute it and/or modify 728 | it under the terms of the GNU General Public License as published by 729 | the Free Software Foundation; either version 2 of the License, or 730 | (at your option) any later version. 731 | 732 | This program is distributed in the hope that it will be useful, 733 | but WITHOUT ANY WARRANTY; without even the implied warranty of 734 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 735 | GNU General Public License for more details. 736 | 737 | You should have received a copy of the GNU General Public License along 738 | with this program; if not, write to the Free Software Foundation, Inc., 739 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 740 | 741 | Also add information on how to contact you by electronic and paper mail. 742 | 743 | If the program is interactive, make it output a short notice like this 744 | when it starts in an interactive mode: 745 | 746 | Gnomovision version 69, Copyright (C) year name of author 747 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 748 | This is free software, and you are welcome to redistribute it 749 | under certain conditions; type `show c' for details. 750 | 751 | The hypothetical commands `show w' and `show c' should show the appropriate 752 | parts of the General Public License. Of course, the commands you use may 753 | be called something other than `show w' and `show c'; they could even be 754 | mouse-clicks or menu items--whatever suits your program. 755 | 756 | You should also get your employer (if you work as a programmer) or your 757 | school, if any, to sign a "copyright disclaimer" for the program, if 758 | necessary. Here is a sample; alter the names: 759 | 760 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 761 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 762 | 763 | , 1 April 1989 764 | Ty Coon, President of Vice 765 | 766 | This General Public License does not permit incorporating your program into 767 | proprietary programs. If your program is a subroutine library, you may 768 | consider it more useful to permit linking proprietary applications with the 769 | library. If this is what you want to do, use the GNU Lesser General 770 | Public License instead of this License. 771 | ``` 772 | 773 |
774 | 775 |
776 | 777 | As an alias: 778 | 779 | ```Bash 780 | alias gpl2='license-up gpl2' 781 | ``` 782 | 783 | #### Version 3 784 | 785 | To create a [GNU General Public License version 3](https://spdx.org/licenses/GPL-3.0-only.html), run: 786 | 787 | ```Bash 788 | license-up gpl3 789 | ``` 790 | 791 | Here is a working example of it. 792 | 793 | ```Bash 794 | license-up gpl3 795 | ``` 796 | 797 | Will create a file `license` with following content: 798 | 799 |
Click to show content 800 | 801 | ```Markdown 802 | GNU GENERAL PUBLIC license 803 | Version 3, 29 June 2007 804 | 805 | Copyright (C) 2007 Free Software Foundation, Inc. 806 | Everyone is permitted to copy and distribute verbatim copies 807 | of this license document, but changing it is not allowed. 808 | 809 | Preamble 810 | 811 | The GNU General Public License is a free, copyleft license for 812 | software and other kinds of works. 813 | 814 | The licenses for most software and other practical works are designed 815 | to take away your freedom to share and change the works. By contrast, 816 | the GNU General Public License is intended to guarantee your freedom to 817 | share and change all versions of a program--to make sure it remains free 818 | software for all its users. We, the Free Software Foundation, use the 819 | GNU General Public License for most of our software; it applies also to 820 | any other work released this way by its authors. You can apply it to 821 | your programs, too. 822 | 823 | When we speak of free software, we are referring to freedom, not 824 | price. Our General Public Licenses are designed to make sure that you 825 | have the freedom to distribute copies of free software (and charge for 826 | them if you wish), that you receive source code or can get it if you 827 | want it, that you can change the software or use pieces of it in new 828 | free programs, and that you know you can do these things. 829 | 830 | To protect your rights, we need to prevent others from denying you 831 | these rights or asking you to surrender the rights. Therefore, you have 832 | certain responsibilities if you distribute copies of the software, or if 833 | you modify it: responsibilities to respect the freedom of others. 834 | 835 | For example, if you distribute copies of such a program, whether 836 | gratis or for a fee, you must pass on to the recipients the same 837 | freedoms that you received. You must make sure that they, too, receive 838 | or can get the source code. And you must show them these terms so they 839 | know their rights. 840 | 841 | Developers that use the GNU GPL protect your rights with two steps: 842 | (1) assert copyright on the software, and (2) offer you this License 843 | giving you legal permission to copy, distribute and/or modify it. 844 | 845 | For the developers' and authors' protection, the GPL clearly explains 846 | that there is no warranty for this free software. For both users' and 847 | authors' sake, the GPL requires that modified versions be marked as 848 | changed, so that their problems will not be attributed erroneously to 849 | authors of previous versions. 850 | 851 | Some devices are designed to deny users access to install or run 852 | modified versions of the software inside them, although the manufacturer 853 | can do so. This is fundamentally incompatible with the aim of 854 | protecting users' freedom to change the software. The systematic 855 | pattern of such abuse occurs in the area of products for individuals to 856 | use, which is precisely where it is most unacceptable. Therefore, we 857 | have designed this version of the GPL to prohibit the practice for those 858 | products. If such problems arise substantially in other domains, we 859 | stand ready to extend this provision to those domains in future versions 860 | of the GPL, as needed to protect the freedom of users. 861 | 862 | Finally, every program is threatened constantly by software patents. 863 | States should not allow patents to restrict development and use of 864 | software on general-purpose computers, but in those that do, we wish to 865 | avoid the special danger that patents applied to a free program could 866 | make it effectively proprietary. To prevent this, the GPL assures that 867 | patents cannot be used to render the program non-free. 868 | 869 | The precise terms and conditions for copying, distribution and 870 | modification follow. 871 | 872 | TERMS AND CONDITIONS 873 | 874 | 0. Definitions. 875 | 876 | "This License" refers to version 3 of the GNU General Public License. 877 | 878 | "Copyright" also means copyright-like laws that apply to other kinds of 879 | works, such as semiconductor masks. 880 | 881 | "The Program" refers to any copyrightable work licensed under this 882 | License. Each licensee is addressed as "you". "Licensees" and 883 | "recipients" may be individuals or organizations. 884 | 885 | To "modify" a work means to copy from or adapt all or part of the work 886 | in a fashion requiring copyright permission, other than the making of an 887 | exact copy. The resulting work is called a "modified version" of the 888 | earlier work or a work "based on" the earlier work. 889 | 890 | A "covered work" means either the unmodified Program or a work based 891 | on the Program. 892 | 893 | To "propagate" a work means to do anything with it that, without 894 | permission, would make you directly or secondarily liable for 895 | infringement under applicable copyright law, except executing it on a 896 | computer or modifying a private copy. Propagation includes copying, 897 | distribution (with or without modification), making available to the 898 | public, and in some countries other activities as well. 899 | 900 | To "convey" a work means any kind of propagation that enables other 901 | parties to make or receive copies. Mere interaction with a user through 902 | a computer network, with no transfer of a copy, is not conveying. 903 | 904 | An interactive user interface displays "Appropriate Legal Notices" 905 | to the extent that it includes a convenient and prominently visible 906 | feature that (1) displays an appropriate copyright notice, and (2) 907 | tells the user that there is no warranty for the work (except to the 908 | extent that warranties are provided), that licensees may convey the 909 | work under this License, and how to view a copy of this License. If 910 | the interface presents a list of user commands or options, such as a 911 | menu, a prominent item in the list meets this criterion. 912 | 913 | 1. Source Code. 914 | 915 | The "source code" for a work means the preferred form of the work 916 | for making modifications to it. "Object code" means any non-source 917 | form of a work. 918 | 919 | A "Standard Interface" means an interface that either is an official 920 | standard defined by a recognized standards body, or, in the case of 921 | interfaces specified for a particular programming language, one that 922 | is widely used among developers working in that language. 923 | 924 | The "System Libraries" of an executable work include anything, other 925 | than the work as a whole, that (a) is included in the normal form of 926 | packaging a Major Component, but which is not part of that Major 927 | Component, and (b) serves only to enable use of the work with that 928 | Major Component, or to implement a Standard Interface for which an 929 | implementation is available to the public in source code form. A 930 | "Major Component", in this context, means a major essential component 931 | (kernel, window system, and so on) of the specific operating system 932 | (if any) on which the executable work runs, or a compiler used to 933 | produce the work, or an object code interpreter used to run it. 934 | 935 | The "Corresponding Source" for a work in object code form means all 936 | the source code needed to generate, install, and (for an executable 937 | work) run the object code and to modify the work, including scripts to 938 | control those activities. However, it does not include the work's 939 | System Libraries, or general-purpose tools or generally available free 940 | programs which are used unmodified in performing those activities but 941 | which are not part of the work. For example, Corresponding Source 942 | includes interface definition files associated with source files for 943 | the work, and the source code for shared libraries and dynamically 944 | linked subprograms that the work is specifically designed to require, 945 | such as by intimate data communication or control flow between those 946 | subprograms and other parts of the work. 947 | 948 | The Corresponding Source need not include anything that users 949 | can regenerate automatically from other parts of the Corresponding 950 | Source. 951 | 952 | The Corresponding Source for a work in source code form is that 953 | same work. 954 | 955 | 2. Basic Permissions. 956 | 957 | All rights granted under this License are granted for the term of 958 | copyright on the Program, and are irrevocable provided the stated 959 | conditions are met. This License explicitly affirms your unlimited 960 | permission to run the unmodified Program. The output from running a 961 | covered work is covered by this License only if the output, given its 962 | content, constitutes a covered work. This License acknowledges your 963 | rights of fair use or other equivalent, as provided by copyright law. 964 | 965 | You may make, run and propagate covered works that you do not 966 | convey, without conditions so long as your license otherwise remains 967 | in force. You may convey covered works to others for the sole purpose 968 | of having them make modifications exclusively for you, or provide you 969 | with facilities for running those works, provided that you comply with 970 | the terms of this License in conveying all material for which you do 971 | not control copyright. Those thus making or running the covered works 972 | for you must do so exclusively on your behalf, under your direction 973 | and control, on terms that prohibit them from making any copies of 974 | your copyrighted material outside their relationship with you. 975 | 976 | Conveying under any other circumstances is permitted solely under 977 | the conditions stated below. Sublicensing is not allowed; section 10 978 | makes it unnecessary. 979 | 980 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 981 | 982 | No covered work shall be deemed part of an effective technological 983 | measure under any applicable law fulfilling obligations under article 984 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 985 | similar laws prohibiting or restricting circumvention of such 986 | measures. 987 | 988 | When you convey a covered work, you waive any legal power to forbid 989 | circumvention of technological measures to the extent such circumvention 990 | is effected by exercising rights under this License with respect to 991 | the covered work, and you disclaim any intention to limit operation or 992 | modification of the work as a means of enforcing, against the work's 993 | users, your or third parties' legal rights to forbid circumvention of 994 | technological measures. 995 | 996 | 4. Conveying Verbatim Copies. 997 | 998 | You may convey verbatim copies of the Program's source code as you 999 | receive it, in any medium, provided that you conspicuously and 1000 | appropriately publish on each copy an appropriate copyright notice; 1001 | keep intact all notices stating that this License and any 1002 | non-permissive terms added in accord with section 7 apply to the code; 1003 | keep intact all notices of the absence of any warranty; and give all 1004 | recipients a copy of this License along with the Program. 1005 | 1006 | You may charge any price or no price for each copy that you convey, 1007 | and you may offer support or warranty protection for a fee. 1008 | 1009 | 5. Conveying Modified Source Versions. 1010 | 1011 | You may convey a work based on the Program, or the modifications to 1012 | produce it from the Program, in the form of source code under the 1013 | terms of section 4, provided that you also meet all of these conditions: 1014 | 1015 | a) The work must carry prominent notices stating that you modified 1016 | it, and giving a relevant date. 1017 | 1018 | b) The work must carry prominent notices stating that it is 1019 | released under this License and any conditions added under section 1020 | 7. This requirement modifies the requirement in section 4 to 1021 | "keep intact all notices". 1022 | 1023 | c) You must license the entire work, as a whole, under this 1024 | License to anyone who comes into possession of a copy. This 1025 | License will therefore apply, along with any applicable section 7 1026 | additional terms, to the whole of the work, and all its parts, 1027 | regardless of how they are packaged. This License gives no 1028 | permission to license the work in any other way, but it does not 1029 | invalidate such permission if you have separately received it. 1030 | 1031 | d) If the work has interactive user interfaces, each must display 1032 | Appropriate Legal Notices; however, if the Program has interactive 1033 | interfaces that do not display Appropriate Legal Notices, your 1034 | work need not make them do so. 1035 | 1036 | A compilation of a covered work with other separate and independent 1037 | works, which are not by their nature extensions of the covered work, 1038 | and which are not combined with it such as to form a larger program, 1039 | in or on a volume of a storage or distribution medium, is called an 1040 | "aggregate" if the compilation and its resulting copyright are not 1041 | used to limit the access or legal rights of the compilation's users 1042 | beyond what the individual works permit. Inclusion of a covered work 1043 | in an aggregate does not cause this License to apply to the other 1044 | parts of the aggregate. 1045 | 1046 | 6. Conveying Non-Source Forms. 1047 | 1048 | You may convey a covered work in object code form under the terms 1049 | of sections 4 and 5, provided that you also convey the 1050 | machine-readable Corresponding Source under the terms of this License, 1051 | in one of these ways: 1052 | 1053 | a) Convey the object code in, or embodied in, a physical product 1054 | (including a physical distribution medium), accompanied by the 1055 | Corresponding Source fixed on a durable physical medium 1056 | customarily used for software interchange. 1057 | 1058 | b) Convey the object code in, or embodied in, a physical product 1059 | (including a physical distribution medium), accompanied by a 1060 | written offer, valid for at least three years and valid for as 1061 | long as you offer spare parts or customer support for that product 1062 | model, to give anyone who possesses the object code either (1) a 1063 | copy of the Corresponding Source for all the software in the 1064 | product that is covered by this License, on a durable physical 1065 | medium customarily used for software interchange, for a price no 1066 | more than your reasonable cost of physically performing this 1067 | conveying of source, or (2) access to copy the 1068 | Corresponding Source from a network server at no charge. 1069 | 1070 | c) Convey individual copies of the object code with a copy of the 1071 | written offer to provide the Corresponding Source. This 1072 | alternative is allowed only occasionally and noncommercially, and 1073 | only if you received the object code with such an offer, in accord 1074 | with subsection 6b. 1075 | 1076 | d) Convey the object code by offering access from a designated 1077 | place (gratis or for a charge), and offer equivalent access to the 1078 | Corresponding Source in the same way through the same place at no 1079 | further charge. You need not require recipients to copy the 1080 | Corresponding Source along with the object code. If the place to 1081 | copy the object code is a network server, the Corresponding Source 1082 | may be on a different server (operated by you or a third party) 1083 | that supports equivalent copying facilities, provided you maintain 1084 | clear directions next to the object code saying where to find the 1085 | Corresponding Source. Regardless of what server hosts the 1086 | Corresponding Source, you remain obligated to ensure that it is 1087 | available for as long as needed to satisfy these requirements. 1088 | 1089 | e) Convey the object code using peer-to-peer transmission, provided 1090 | you inform other peers where the object code and Corresponding 1091 | Source of the work are being offered to the general public at no 1092 | charge under subsection 6d. 1093 | 1094 | A separable portion of the object code, whose source code is excluded 1095 | from the Corresponding Source as a System Library, need not be 1096 | included in conveying the object code work. 1097 | 1098 | A "User Product" is either (1) a "consumer product", which means any 1099 | tangible personal property which is normally used for personal, family, 1100 | or household purposes, or (2) anything designed or sold for incorporation 1101 | into a dwelling. In determining whether a product is a consumer product, 1102 | doubtful cases shall be resolved in favor of coverage. For a particular 1103 | product received by a particular user, "normally used" refers to a 1104 | typical or common use of that class of product, regardless of the status 1105 | of the particular user or of the way in which the particular user 1106 | actually uses, or expects or is expected to use, the product. A product 1107 | is a consumer product regardless of whether the product has substantial 1108 | commercial, industrial or non-consumer uses, unless such uses represent 1109 | the only significant mode of use of the product. 1110 | 1111 | "Installation Information" for a User Product means any methods, 1112 | procedures, authorization keys, or other information required to install 1113 | and execute modified versions of a covered work in that User Product from 1114 | a modified version of its Corresponding Source. The information must 1115 | suffice to ensure that the continued functioning of the modified object 1116 | code is in no case prevented or interfered with solely because 1117 | modification has been made. 1118 | 1119 | If you convey an object code work under this section in, or with, or 1120 | specifically for use in, a User Product, and the conveying occurs as 1121 | part of a transaction in which the right of possession and use of the 1122 | User Product is transferred to the recipient in perpetuity or for a 1123 | fixed term (regardless of how the transaction is characterized), the 1124 | Corresponding Source conveyed under this section must be accompanied 1125 | by the Installation Information. But this requirement does not apply 1126 | if neither you nor any third party retains the ability to install 1127 | modified object code on the User Product (for example, the work has 1128 | been installed in ROM). 1129 | 1130 | The requirement to provide Installation Information does not include a 1131 | requirement to continue to provide support service, warranty, or updates 1132 | for a work that has been modified or installed by the recipient, or for 1133 | the User Product in which it has been modified or installed. Access to a 1134 | network may be denied when the modification itself materially and 1135 | adversely affects the operation of the network or violates the rules and 1136 | protocols for communication across the network. 1137 | 1138 | Corresponding Source conveyed, and Installation Information provided, 1139 | in accord with this section must be in a format that is publicly 1140 | documented (and with an implementation available to the public in 1141 | source code form), and must require no special password or key for 1142 | unpacking, reading or copying. 1143 | 1144 | 7. Additional Terms. 1145 | 1146 | "Additional permissions" are terms that supplement the terms of this 1147 | License by making exceptions from one or more of its conditions. 1148 | Additional permissions that are applicable to the entire Program shall 1149 | be treated as though they were included in this License, to the extent 1150 | that they are valid under applicable law. If additional permissions 1151 | apply only to part of the Program, that part may be used separately 1152 | under those permissions, but the entire Program remains governed by 1153 | this License without regard to the additional permissions. 1154 | 1155 | When you convey a copy of a covered work, you may at your option 1156 | remove any additional permissions from that copy, or from any part of 1157 | it. (Additional permissions may be written to require their own 1158 | removal in certain cases when you modify the work.) You may place 1159 | additional permissions on material, added by you to a covered work, 1160 | for which you have or can give appropriate copyright permission. 1161 | 1162 | Notwithstanding any other provision of this License, for material you 1163 | add to a covered work, you may (if authorized by the copyright holders of 1164 | that material) supplement the terms of this License with terms: 1165 | 1166 | a) Disclaiming warranty or limiting liability differently from the 1167 | terms of sections 15 and 16 of this License; or 1168 | 1169 | b) Requiring preservation of specified reasonable legal notices or 1170 | author attributions in that material or in the Appropriate Legal 1171 | Notices displayed by works containing it; or 1172 | 1173 | c) Prohibiting misrepresentation of the origin of that material, or 1174 | requiring that modified versions of such material be marked in 1175 | reasonable ways as different from the original version; or 1176 | 1177 | d) Limiting the use for publicity purposes of names of licensors or 1178 | authors of the material; or 1179 | 1180 | e) Declining to grant rights under trademark law for use of some 1181 | trade names, trademarks, or service marks; or 1182 | 1183 | f) Requiring indemnification of licensors and authors of that 1184 | material by anyone who conveys the material (or modified versions of 1185 | it) with contractual assumptions of liability to the recipient, for 1186 | any liability that these contractual assumptions directly impose on 1187 | those licensors and authors. 1188 | 1189 | All other non-permissive additional terms are considered "further 1190 | restrictions" within the meaning of section 10. If the Program as you 1191 | received it, or any part of it, contains a notice stating that it is 1192 | governed by this License along with a term that is a further 1193 | restriction, you may remove that term. If a license document contains 1194 | a further restriction but permits relicensing or conveying under this 1195 | License, you may add to a covered work material governed by the terms 1196 | of that license document, provided that the further restriction does 1197 | not survive such relicensing or conveying. 1198 | 1199 | If you add terms to a covered work in accord with this section, you 1200 | must place, in the relevant source files, a statement of the 1201 | additional terms that apply to those files, or a notice indicating 1202 | where to find the applicable terms. 1203 | 1204 | Additional terms, permissive or non-permissive, may be stated in the 1205 | form of a separately written license, or stated as exceptions; 1206 | the above requirements apply either way. 1207 | 1208 | 8. Termination. 1209 | 1210 | You may not propagate or modify a covered work except as expressly 1211 | provided under this License. Any attempt otherwise to propagate or 1212 | modify it is void, and will automatically terminate your rights under 1213 | this License (including any patent licenses granted under the third 1214 | paragraph of section 11). 1215 | 1216 | However, if you cease all violation of this License, then your 1217 | license from a particular copyright holder is reinstated (a) 1218 | provisionally, unless and until the copyright holder explicitly and 1219 | finally terminates your license, and (b) permanently, if the copyright 1220 | holder fails to notify you of the violation by some reasonable means 1221 | prior to 60 days after the cessation. 1222 | 1223 | Moreover, your license from a particular copyright holder is 1224 | reinstated permanently if the copyright holder notifies you of the 1225 | violation by some reasonable means, this is the first time you have 1226 | received notice of violation of this License (for any work) from that 1227 | copyright holder, and you cure the violation prior to 30 days after 1228 | your receipt of the notice. 1229 | 1230 | Termination of your rights under this section does not terminate the 1231 | licenses of parties who have received copies or rights from you under 1232 | this License. If your rights have been terminated and not permanently 1233 | reinstated, you do not qualify to receive new licenses for the same 1234 | material under section 10. 1235 | 1236 | 9. Acceptance Not Required for Having Copies. 1237 | 1238 | You are not required to accept this License in order to receive or 1239 | run a copy of the Program. Ancillary propagation of a covered work 1240 | occurring solely as a consequence of using peer-to-peer transmission 1241 | to receive a copy likewise does not require acceptance. However, 1242 | nothing other than this License grants you permission to propagate or 1243 | modify any covered work. These actions infringe copyright if you do 1244 | not accept this License. Therefore, by modifying or propagating a 1245 | covered work, you indicate your acceptance of this License to do so. 1246 | 1247 | 10. Automatic Licensing of Downstream Recipients. 1248 | 1249 | Each time you convey a covered work, the recipient automatically 1250 | receives a license from the original licensors, to run, modify and 1251 | propagate that work, subject to this License. You are not responsible 1252 | for enforcing compliance by third parties with this License. 1253 | 1254 | An "entity transaction" is a transaction transferring control of an 1255 | organization, or substantially all assets of one, or subdividing an 1256 | organization, or merging organizations. If propagation of a covered 1257 | work results from an entity transaction, each party to that 1258 | transaction who receives a copy of the work also receives whatever 1259 | licenses to the work the party's predecessor in interest had or could 1260 | give under the previous paragraph, plus a right to possession of the 1261 | Corresponding Source of the work from the predecessor in interest, if 1262 | the predecessor has it or can get it with reasonable efforts. 1263 | 1264 | You may not impose any further restrictions on the exercise of the 1265 | rights granted or affirmed under this License. For example, you may 1266 | not impose a license fee, royalty, or other charge for exercise of 1267 | rights granted under this License, and you may not initiate litigation 1268 | (including a cross-claim or counterclaim in a lawsuit) alleging that 1269 | any patent claim is infringed by making, using, selling, offering for 1270 | sale, or importing the Program or any portion of it. 1271 | 1272 | 11. Patents. 1273 | 1274 | A "contributor" is a copyright holder who authorizes use under this 1275 | License of the Program or a work on which the Program is based. The 1276 | work thus licensed is called the contributor's "contributor version". 1277 | 1278 | A contributor's "essential patent claims" are all patent claims 1279 | owned or controlled by the contributor, whether already acquired or 1280 | hereafter acquired, that would be infringed by some manner, permitted 1281 | by this License, of making, using, or selling its contributor version, 1282 | but do not include claims that would be infringed only as a 1283 | consequence of further modification of the contributor version. For 1284 | purposes of this definition, "control" includes the right to grant 1285 | patent sublicenses in a manner consistent with the requirements of 1286 | this License. 1287 | 1288 | Each contributor grants you a non-exclusive, worldwide, royalty-free 1289 | patent license under the contributor's essential patent claims, to 1290 | make, use, sell, offer for sale, import and otherwise run, modify and 1291 | propagate the contents of its contributor version. 1292 | 1293 | In the following three paragraphs, a "patent license" is any express 1294 | agreement or commitment, however denominated, not to enforce a patent 1295 | (such as an express permission to practice a patent or covenant not to 1296 | sue for patent infringement). To "grant" such a patent license to a 1297 | party means to make such an agreement or commitment not to enforce a 1298 | patent against the party. 1299 | 1300 | If you convey a covered work, knowingly relying on a patent license, 1301 | and the Corresponding Source of the work is not available for anyone 1302 | to copy, free of charge and under the terms of this License, through a 1303 | publicly available network server or other readily accessible means, 1304 | then you must either (1) cause the Corresponding Source to be so 1305 | available, or (2) arrange to deprive yourself of the benefit of the 1306 | patent license for this particular work, or (3) arrange, in a manner 1307 | consistent with the requirements of this License, to extend the patent 1308 | license to downstream recipients. "Knowingly relying" means you have 1309 | actual knowledge that, but for the patent license, your conveying the 1310 | covered work in a country, or your recipient's use of the covered work 1311 | in a country, would infringe one or more identifiable patents in that 1312 | country that you have reason to believe are valid. 1313 | 1314 | If, pursuant to or in connection with a single transaction or 1315 | arrangement, you convey, or propagate by procuring conveyance of, a 1316 | covered work, and grant a patent license to some of the parties 1317 | receiving the covered work authorizing them to use, propagate, modify 1318 | or convey a specific copy of the covered work, then the patent license 1319 | you grant is automatically extended to all recipients of the covered 1320 | work and works based on it. 1321 | 1322 | A patent license is "discriminatory" if it does not include within 1323 | the scope of its coverage, prohibits the exercise of, or is 1324 | conditioned on the non-exercise of one or more of the rights that are 1325 | specifically granted under this License. You may not convey a covered 1326 | work if you are a party to an arrangement with a third party that is 1327 | in the business of distributing software, under which you make payment 1328 | to the third party based on the extent of your activity of conveying 1329 | the work, and under which the third party grants, to any of the 1330 | parties who would receive the covered work from you, a discriminatory 1331 | patent license (a) in connection with copies of the covered work 1332 | conveyed by you (or copies made from those copies), or (b) primarily 1333 | for and in connection with specific products or compilations that 1334 | contain the covered work, unless you entered into that arrangement, 1335 | or that patent license was granted, prior to 28 March 2007. 1336 | 1337 | Nothing in this License shall be construed as excluding or limiting 1338 | any implied license or other defenses to infringement that may 1339 | otherwise be available to you under applicable patent law. 1340 | 1341 | 12. No Surrender of Others' Freedom. 1342 | 1343 | If conditions are imposed on you (whether by court order, agreement or 1344 | otherwise) that contradict the conditions of this License, they do not 1345 | excuse you from the conditions of this License. If you cannot convey a 1346 | covered work so as to satisfy simultaneously your obligations under this 1347 | License and any other pertinent obligations, then as a consequence you may 1348 | not convey it at all. For example, if you agree to terms that obligate you 1349 | to collect a royalty for further conveying from those to whom you convey 1350 | the Program, the only way you could satisfy both those terms and this 1351 | License would be to refrain entirely from conveying the Program. 1352 | 1353 | 13. Use with the GNU Affero General Public License. 1354 | 1355 | Notwithstanding any other provision of this License, you have 1356 | permission to link or combine any covered work with a work licensed 1357 | under version 3 of the GNU Affero General Public License into a single 1358 | combined work, and to convey the resulting work. The terms of this 1359 | License will continue to apply to the part which is the covered work, 1360 | but the special requirements of the GNU Affero General Public License, 1361 | section 13, concerning interaction through a network will apply to the 1362 | combination as such. 1363 | 1364 | 14. Revised Versions of this License. 1365 | 1366 | The Free Software Foundation may publish revised and/or new versions of 1367 | the GNU General Public License from time to time. Such new versions will 1368 | be similar in spirit to the present version, but may differ in detail to 1369 | address new problems or concerns. 1370 | 1371 | Each version is given a distinguishing version number. If the 1372 | Program specifies that a certain numbered version of the GNU General 1373 | Public License "or any later version" applies to it, you have the 1374 | option of following the terms and conditions either of that numbered 1375 | version or of any later version published by the Free Software 1376 | Foundation. If the Program does not specify a version number of the 1377 | GNU General Public License, you may choose any version ever published 1378 | by the Free Software Foundation. 1379 | 1380 | If the Program specifies that a proxy can decide which future 1381 | versions of the GNU General Public License can be used, that proxy's 1382 | public statement of acceptance of a version permanently authorizes you 1383 | to choose that version for the Program. 1384 | 1385 | Later license versions may give you additional or different 1386 | permissions. However, no additional obligations are imposed on any 1387 | author or copyright holder as a result of your choosing to follow a 1388 | later version. 1389 | 1390 | 15. Disclaimer of Warranty. 1391 | 1392 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 1393 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 1394 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 1395 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 1396 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1397 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 1398 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 1399 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 1400 | 1401 | 16. Limitation of Liability. 1402 | 1403 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 1404 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 1405 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 1406 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 1407 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 1408 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 1409 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 1410 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 1411 | SUCH DAMAGES. 1412 | 1413 | 17. Interpretation of Sections 15 and 16. 1414 | 1415 | If the disclaimer of warranty and limitation of liability provided 1416 | above cannot be given local legal effect according to their terms, 1417 | reviewing courts shall apply local law that most closely approximates 1418 | an absolute waiver of all civil liability in connection with the 1419 | Program, unless a warranty or assumption of liability accompanies a 1420 | copy of the Program in return for a fee. 1421 | 1422 | END OF TERMS AND CONDITIONS 1423 | 1424 | How to Apply These Terms to Your New Programs 1425 | 1426 | If you develop a new program, and you want it to be of the greatest 1427 | possible use to the public, the best way to achieve this is to make it 1428 | free software which everyone can redistribute and change under these terms. 1429 | 1430 | To do so, attach the following notices to the program. It is safest 1431 | to attach them to the start of each source file to most effectively 1432 | state the exclusion of warranty; and each file should have at least 1433 | the "copyright" line and a pointer to where the full notice is found. 1434 | 1435 | 1436 | Copyright (C) 1437 | 1438 | This program is free software: you can redistribute it and/or modify 1439 | it under the terms of the GNU General Public License as published by 1440 | the Free Software Foundation, either version 3 of the License, or 1441 | (at your option) any later version. 1442 | 1443 | This program is distributed in the hope that it will be useful, 1444 | but WITHOUT ANY WARRANTY; without even the implied warranty of 1445 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1446 | GNU General Public License for more details. 1447 | 1448 | You should have received a copy of the GNU General Public License 1449 | along with this program. If not, see . 1450 | 1451 | Also add information on how to contact you by electronic and paper mail. 1452 | 1453 | If the program does terminal interaction, make it output a short 1454 | notice like this when it starts in an interactive mode: 1455 | 1456 | Copyright (C) 1457 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 1458 | This is free software, and you are welcome to redistribute it 1459 | under certain conditions; type `show c' for details. 1460 | 1461 | The hypothetical commands `show w' and `show c' should show the appropriate 1462 | parts of the General Public License. Of course, your program's commands 1463 | might be different; for a GUI interface, you would use an "about box". 1464 | 1465 | You should also get your employer (if you work as a programmer) or school, 1466 | if any, to sign a "copyright disclaimer" for the program, if necessary. 1467 | For more information on this, and how to apply and follow the GNU GPL, see 1468 | . 1469 | 1470 | The GNU General Public License does not permit incorporating your program 1471 | into proprietary programs. If your program is a subroutine library, you 1472 | may consider it more useful to permit linking proprietary applications with 1473 | the library. If this is what you want to do, use the GNU Lesser General 1474 | Public License instead of this License. But first, please read 1475 | . 1476 | ``` 1477 | 1478 |
1479 | 1480 |
1481 | 1482 | As an alias: 1483 | 1484 | ```Bash 1485 | alias gpl3='license-up gpl3' 1486 | ``` 1487 | 1488 | Or, if you prefer: 1489 | 1490 | ```Bash 1491 | alias gpl='license-up gpl3' 1492 | ``` 1493 | 1494 | ### ISC License 1495 | 1496 | To create [ISC license](https://spdx.org/licenses/ISC.html), run: 1497 | 1498 | ```Bash 1499 | license-up isc 1500 | ``` 1501 | 1502 | Here is a working example of it. 1503 | 1504 | ```Bash 1505 | license-up isc Nikita Voloboev 1506 | ``` 1507 | 1508 | Will create a file `license` with following content: 1509 | 1510 |
Click to show content 1511 | 1512 | ```Markdown 1513 | Copyright (c) 2019-present, Nikita Voloboev 1514 | 1515 | Permission to use, copy, modify, and distribute this software for any 1516 | purpose with or without fee is hereby granted, provided that the above 1517 | copyright notice and this permission notice appear in all copies. 1518 | 1519 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1520 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1521 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1522 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1523 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1524 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1525 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1526 | ``` 1527 | 1528 |
1529 | 1530 |
1531 | 1532 | As an alias: 1533 | 1534 | ```Bash 1535 | alias isc='license-up isc Nikita Voloboev' 1536 | ``` 1537 | 1538 | ### WTFPL License 1539 | 1540 | To create [WTFPL license](https://spdx.org/licenses/WTFPL.html), run: 1541 | 1542 | ```Bash 1543 | license-up wtfpl 1544 | ``` 1545 | 1546 | Here is a working example of it. 1547 | 1548 | ```Bash 1549 | license-up wtfpl Nikita Voloboev 1550 | ``` 1551 | 1552 | Will create a file `license` with following content: 1553 | 1554 |
Click to show content 1555 | 1556 | ```Markdown 1557 | DO WHAT THE FUCK YOU WANT TO PUBLIC license 1558 | Version 2, December 2004 1559 | 1560 | Copyright (c) 2019-present, Nikita Voloboev 1561 | 1562 | Everyone is permitted to copy and distribute verbatim or modified 1563 | copies of this license document, and changing it is allowed as long 1564 | as the name is changed. 1565 | 1566 | DO WHAT THE FUCK YOU WANT TO PUBLIC license 1567 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 1568 | 1569 | 0. You just DO WHAT THE FUCK YOU WANT TO. 1570 | ``` 1571 | 1572 |
1573 | 1574 |
1575 | 1576 | As an alias: 1577 | 1578 | ```Bash 1579 | alias wtfpl='license-up wtfpl Nikita Voloboev' 1580 | ``` 1581 | 1582 | ### Blue Oak Model License 1583 | 1584 | To create [Blue Oak Model license](https://blueoakcouncil.org/license/1.0.0), run: 1585 | 1586 | ```Bash 1587 | license-up boml 1588 | ``` 1589 | 1590 | Here is a working example of it. 1591 | 1592 | ```Bash 1593 | license-up boml 1594 | ``` 1595 | 1596 | Will create a file `license` with following content: 1597 | 1598 |
Click to show content 1599 | 1600 | ```Markdown 1601 | Blue Oak Model License 1602 | 1603 | Version 1.0.0 1604 | 1605 | Purpose 1606 | 1607 | This license gives everyone as much permission to work with 1608 | this software as possible, while protecting contributors 1609 | from liability. 1610 | 1611 | Acceptance 1612 | 1613 | In order to receive this license, you must agree to its 1614 | rules. The rules of this license are both obligations 1615 | under that agreement and conditions to your license. 1616 | You must not do anything with this software that triggers 1617 | a rule that you cannot or will not follow. 1618 | 1619 | Copyright 1620 | 1621 | Each contributor licenses you to do everything with this 1622 | software that would otherwise infringe that contributor's 1623 | copyright in it. 1624 | 1625 | Notices 1626 | 1627 | You must ensure that everyone who gets a copy of 1628 | any part of this software from you, with or without 1629 | changes, also gets the text of this license or a link to 1630 | . 1631 | 1632 | Excuse 1633 | 1634 | If anyone notifies you in writing that you have not 1635 | complied with Notices, you can keep your 1636 | license by taking all practical steps to comply within 30 1637 | days after the notice. If you do not do so, your license 1638 | ends immediately. 1639 | 1640 | Patent 1641 | 1642 | Each contributor licenses you to do everything with this 1643 | software that would otherwise infringe any patent claims 1644 | they can license or become able to license. 1645 | 1646 | Reliability 1647 | 1648 | No contributor can revoke this license. 1649 | 1650 | No Liability 1651 | 1652 | As far as the law allows, this software comes as is, 1653 | without any warranty or condition, and no contributor 1654 | will be liable to anyone for any damages related to this 1655 | software or this license, under any kind of legal claim. 1656 | ``` 1657 | 1658 |
1659 | 1660 |
1661 | 1662 | As an alias: 1663 | 1664 | ```Bash 1665 | alias boml='license-up boml' 1666 | ``` 1667 | 1668 | ## Contribute 1669 | 1670 | Always open to useful ideas or fixes in form of issues or PRs. 1671 | 1672 | Can [open new issue](../../issues/new/choose) (search [existing issues](../../issues) first) or [start discussion](../../discussions). 1673 | 1674 | It's okay to submit draft PR as you can get help along the way to make it merge ready. 1675 | 1676 | Join [Discord](https://discord.com/invite/TVafwaD23d) for more indepth discussions on this repo and [others](https://github.com/nikitavoloboev#src). 1677 | 1678 | ## Related 1679 | 1680 | - [OSS Ninja](https://oss.ninja) - Open Source licenses with just a link. 1681 | - [SPDX License List](https://spdx.org/licenses/) - List of commonly found licenses. 1682 | - [license-generator](https://github.com/azu/license-generator) - Command line tool that generate license file. 1683 | 1684 | ### 🖤 1685 | 1686 | [Support on GitHub](https://github.com/sponsors/nikitavoloboev) or look into [other projects](https://nikiv.dev/projects). 1687 | 1688 | [![Discord](https://img.shields.io/badge/Discord-100000?style=flat&logo=discord&logoColor=white&labelColor=black&color=black)](https://discord.com/invite/TVafwaD23d) [![X](https://img.shields.io/badge/nikitavoloboev-100000?logo=X&color=black)](https://twitter.com/nikitavoloboev) [![nikiv.dev](https://img.shields.io/badge/nikiv.dev-black)](https://nikiv.dev) 1689 | --------------------------------------------------------------------------------