Crates.io | rz |
lib.rs | rz |
version | 0.1.5 |
source | src |
created_at | 2022-06-23 05:07:23.663218 |
updated_at | 2022-06-24 04:54:02.924681 |
description | rt is a command line utility to add license text to your source code files so you can focus on production. |
homepage | |
repository | https://github.com/tristanisham/rz |
max_upload_size | |
id | 611664 |
size | 20,302 |
A command line tool for adding license text to your source files so you can focus on production
$ rz -n yourname
Name specifies your name as it should appear in the license. If name is not specified, it'll insert the $USER environment variable.
$ rz -y 2022
Year specifies the year as it should appear in the license. If year is not specified, it'll insert the current year.
$ rz -l MIT
License specifies the license to insert into your document. Use common abbreviations like MIT or Apache2.
$ rz -i sourcecode.ts
Input specifies the file to prepend your license onto. It's good if you already have your code, and just want to add a license before.
$ rz -i sourcecode.ts -o newsourcecode.ts
Output specifies the file to write your license (plus any input specified with -i
) to. If not provided it just assumes you want to replace your input with your output.
$ rz -pl "// "
Prefix Line specifies what to prefix before each line of your output. Think the specific comment charachters for your source langauge.
$ rz -sl '-->'
Suffix Line specifies what to Suffix after each line of your output. Think the closing brackets of a html comment. Great for markdown!
// main.go
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
$ rz -i main.go -pl "// " -l MIT -n "Your Name"
// Copyright ©2022 Your Name
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// main.go
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}