-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bf98883
Showing
4 changed files
with
454 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
tdraw | ||
--- | ||
Inspired by [Explaining Code using ASCII Art](https://blog.regehr.org/archives/1653).<br/> | ||
Supports box / line drawing, text input and eraser. | ||
|
||
#### Install | ||
``` | ||
go get -u github.com/aca/tdraw | ||
``` | ||
#### Usage | ||
``` | ||
tdraw > output | ||
``` | ||
|
||
``` | ||
tdraw has 3 mode. | ||
ESC: Box Mode(default) | ||
L: Draw Line | ||
I: Text | ||
--- | ||
MouseR: Eraser | ||
CTRL-C/CTRL-D: exit | ||
``` | ||
|
||
``` | ||
┌──────────────┐ | ||
│ │ BOX | ||
└──────────────┘ | ||
<--------------- LINES | ||
---------------> | ||
TEXT | ||
---- --- ----> ERASE WITH MouseR | ||
``` | ||
|
||
``` | ||
+----------+ | ||
v | | ||
┌─────────────────┐ | | ||
│ STATE A │ | | ||
└─────────────────┘ | | ||
| | | ||
v | | ||
┌─────────────────┐ | | ||
│ │ | ┌───────────────┐ | ||
│ STATE B │ ---------> │ FAIL │ | ||
│ │ | └───────────────┘ | ||
└─────────────────┘ | | ||
| | | ||
v | | ||
┌─────────────────┐ | | ||
│ │ | | ||
│ STATE C │ | | ||
│ │ ---+ | ||
└─────────────────┘ | ||
``` |
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,8 @@ | ||
module github.com/aca/tdraw | ||
|
||
go 1.14 | ||
|
||
require ( | ||
github.com/gdamore/tcell v1.3.0 | ||
github.com/mattn/go-runewidth v0.0.9 | ||
) |
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,14 @@ | ||
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= | ||
github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= | ||
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= | ||
github.com/gdamore/tcell v1.3.0 h1:r35w0JBADPZCVQijYebl6YMWWtHRqVEGt7kL2eBADRM= | ||
github.com/gdamore/tcell v1.3.0/go.mod h1:Hjvr+Ofd+gLglo7RYKxxnzCBmev3BzsS67MebKS4zMM= | ||
github.com/lucasb-eyer/go-colorful v1.0.2 h1:mCMFu6PgSozg9tDNMMK3g18oJBX7oYGrC09mS6CXfO4= | ||
github.com/lucasb-eyer/go-colorful v1.0.2/go.mod h1:0MS4r+7BZKSJ5mw4/S5MPN+qHFF1fYclkSPilDOKW0s= | ||
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= | ||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= | ||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= | ||
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756 h1:9nuHUbU8dRnRRfj9KjWUVrJeoexdbeMjttk6Oh1rD10= | ||
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= | ||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |
Oops, something went wrong.