-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* colorization experiment * todo * Add dependency on github.com/johnkerl/lumin * lumin dependency * more badges in README.md * on-line help for bold/underine/reverse * update webdocs
- Loading branch information
Showing
19 changed files
with
259 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// This is the entry point for the mlr executable. | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/johnkerl/miller/internal/pkg/colorizer" | ||
) | ||
|
||
const boldString = "\u001b[1m" | ||
const underlineString = "\u001b[4m" | ||
const reversedString = "\u001b[7m" | ||
const redString = "\u001b[1;31m" | ||
const blueString = "\u001b[1;34m" | ||
const defaultString = "\u001b[0m" | ||
|
||
func main() { | ||
fmt.Printf("Hello, world!\n") | ||
|
||
fmt.Printf("1. before %s during %s after\n", "", "") | ||
fmt.Printf("4. before %s during %s after\n", boldString, defaultString) | ||
fmt.Printf("2. before %s during %s after\n", redString, defaultString) | ||
fmt.Printf("3. before %s during %s after\n", blueString, defaultString) | ||
fmt.Printf("5. before %s during %s after\n", redString+boldString, defaultString) | ||
fmt.Printf("7. before %s during %s after\n", blueString, defaultString) | ||
fmt.Printf("8. before %s during %s after\n", boldString, defaultString) | ||
fmt.Printf("9. before %s during %s after\n", boldString, defaultString) | ||
fmt.Println() | ||
|
||
names := []string{ | ||
"plain", | ||
"red", | ||
"bold", | ||
"bold-red", | ||
"red-bold", | ||
"blue-underline", | ||
"208", | ||
"reversed-208", | ||
} | ||
for _, name := range names { | ||
colorizer.SetKeyColor(name) | ||
fmt.Printf("testing: [%s]\n", colorizer.MaybeColorizeKey(name, true)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,14 @@ module github.com/johnkerl/miller | |
// * go build github.com/johnkerl/miller/cmd/mlr | ||
// * go install github.com/johnkerl/miller/cmd/mlr | ||
|
||
// go get github.com/johnkerl/[email protected] | ||
// Local development: | ||
// replace github.com/johnkerl/lumin => /Users/kerl/git/johnkerl/lumin | ||
|
||
go 1.15 | ||
|
||
require ( | ||
github.com/goccmack/gocc v0.0.0-20211213154817-7ea699349eca // indirect | ||
github.com/johnkerl/lumin v1.0.0 // indirect | ||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 | ||
github.com/lestrrat-go/strftime v1.0.5 | ||
github.com/mattn/go-isatty v0.0.14 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.