-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
readme changes, other default font, go-bindata for default font, litt…
…le commenting
- Loading branch information
probandula
committed
Oct 24, 2016
1 parent
bc87934
commit edfcb18
Showing
14 changed files
with
2,533 additions
and
822 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,32 +1,34 @@ | ||
# figlet4go | ||
_______ __ _______ __ _______ .___________. _ _ _______ ______ | ||
| ____|| | / _____|| | | ____|| || || | / _____| / __ \ | ||
| |__ | | | | __ | | | |__ `---| |----`| || |_ | | __ | | | | | ||
| __| | | | | |_ | | | | __| | | |__ _| | | |_ | | | | | | ||
| | | | | |__| | | `----.| |____ | | | | | |__| | | `--' | | ||
|__| |__| \______| |_______||_______| |__| |_| \______| \______/ | ||
# FIGlet for Go | ||
|
||
A port of [figlet](http://www.figlet.org/) to golang. | ||
Make it easier to use,add some new feature such as colorized outputs. | ||
**Currently in Development. | ||
Sould work but will be improved (add demos, better font adding, maybe better performance, more default fonts)** | ||
|
||
## Usage | ||
A port of [figlet](http://www.figlet.org/) to golang and fork of [getwe/figlet4go](https://github.com/getwe/figlet4go). | ||
|
||
 | ||
|
||
### Install | ||
## Installation | ||
|
||
``` | ||
go get -u github.com/getwe/figlet4go | ||
go get -u github.com/probandula/figlet4go | ||
``` | ||
|
||
### Demo | ||
## Usage | ||
```go | ||
// Create the renderer | ||
ascii := figlet4go.NewAsciiRender() | ||
|
||
// Optional: Add color to the letters (https://github.com/fatih/color needed) | ||
|
||
``` | ||
cd demo/ | ||
go build | ||
./demo -str="golang" | ||
#Maybe you have to `brew install figlet` if you need 3D fond in mac osx. | ||
// Render and print the string | ||
renderStr, _ := ascii.Render("Hello World") | ||
fmt.Print(renderStr) | ||
``` | ||
|
||
see details in `demo/demo.go` . | ||
## Default font | ||
The default font is built into the `bindata.go` file with the tool [go-bindata](https://github.com/jteeuwen/go-bindata). | ||
The bash script for building the default font is stored in `tools/` (`go-bindata` must be installed). | ||
|
||
 | ||
## Use the demo | ||
There are [demo](https://github.com/probandula/figlet4go/blob/master/demo) programs for trying out the library. | ||
To run them, `cd` into the `demo/` directory and run `go run [filename]` on any program you want to run. |
Oops, something went wrong.