~kota/tide

67e49a7ccef9e4190751af37bc886109ca8c51a2 — Dakota Walsh 1 year, 4 months ago fcef8d7
use terminal colors instead of unicode symbols
3 files changed, 17 insertions(+), 2 deletions(-)

M display.go
M go.mod
M go.sum
M display.go => display.go +3 -1
@@ 7,6 7,8 @@ import (
	"fmt"
	"math"
	"time"

	"github.com/wzshiming/ctc"
)

const graphWidth int = 36


@@ 64,7 66,7 @@ func graph(prev, next Tide, now time.Time) string {
		for y := range w {
			if h >= rows[y] {
				if now.After(t) {
					waves[x][y] = "░"
					waves[x][y] = fmt.Sprintf("%s%s%s", ctc.BackgroundBrightBlack, "░", ctc.Reset)
				} else {
					waves[x][y] = "█"
				}

M go.mod => go.mod +6 -1
@@ 2,4 2,9 @@ module git.sr.ht/~kota/tide

go 1.12

require github.com/mattn/go-isatty v0.0.13
require (
	github.com/mattn/go-isatty v0.0.13
	github.com/wzshiming/ctc v1.2.3
	github.com/wzshiming/winseq v0.0.0-20200720163736-7fa652d2b50e // indirect
	golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
)

M go.sum => go.sum +8 -0
@@ 2,5 2,13 @@ github.com/guptarohit/asciigraph v0.5.2 h1:aG4kATuuyHQMdTi89KKVIRIcDSIHrsKIozo/U
github.com/guptarohit/asciigraph v0.5.2/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag=
github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA=
github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/wzshiming/ctc v1.2.3 h1:q+hW3IQNsjIlOFBTGZZZeIXTElFM4grF4spW/errh/c=
github.com/wzshiming/ctc v1.2.3/go.mod h1:2tVAtIY7SUyraSk0JxvwmONNPFL4ARavPuEsg5+KA28=
github.com/wzshiming/winseq v0.0.0-20200112104235-db357dc107ae/go.mod h1:VTAq37rkGeV+WOybvZwjXiJOicICdpLCN8ifpISjK20=
github.com/wzshiming/winseq v0.0.0-20200720163736-7fa652d2b50e h1:lp2XFXaf81Y9yhE4rIt66qe6ss0jSQsBpIYWz8D/5N0=
github.com/wzshiming/winseq v0.0.0-20200720163736-7fa652d2b50e/go.mod h1:VTAq37rkGeV+WOybvZwjXiJOicICdpLCN8ifpISjK20=
golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=