Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guumaster/textifier
A simple tool to transform text on your terminal or Go program.
https://github.com/guumaster/textifier
cli golang text-transformer
Last synced: about 5 hours ago
JSON representation
A simple tool to transform text on your terminal or Go program.
- Host: GitHub
- URL: https://github.com/guumaster/textifier
- Owner: guumaster
- License: mit
- Created: 2020-02-02T21:01:57.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-29T12:10:23.000Z (almost 5 years ago)
- Last Synced: 2024-11-12T06:02:09.204Z (2 months ago)
- Topics: cli, golang, text-transformer
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Tests](https://img.shields.io/github/workflow/status/guumaster/textifier/Test)](https://github.com/guumaster/textifier/actions?query=workflow%3ATest)
[![GitHub Release](https://img.shields.io/github/release/guumaster/textifier.svg?logo=github&labelColor=262b30)](https://github.com/guumaster/textifier/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/guumaster/textifier)](https://goreportcard.com/report/github.com/guumaster/textifier)
[![License](https://img.shields.io/github/license/guumaster/textifier)](https://github.com/guumaster/textifier/LICENSE)# textifier
A simple tool to transform text on your terminal or Go program.* [Transformers doc](https://pkg.go.dev/github.com/guumaster/[email protected]/pkg/transform?tab=doc)
## Installation
### Install binary directly
Feel free to change the path from `/usr/local/bin`, just make sure `textifier` is available on your `$PATH` (check with `textifier -h`).
#### Linux/MacOS
```
$ curl -sfL https://raw.githubusercontent.com/guumaster/textifier/master/install.sh | bash -s -- -b /usr/local/bin
```Depending on the path you choose, it may need `sudo`
```
$ curl -sfL https://raw.githubusercontent.com/guumaster/textifier/master/install.sh | sudo bash -s -- -b /usr/local/bin
```### Release page download
Go to the [Release page](https://github.com/guumaster/textifier/releases) and pick one.
### With Go tools
```
go get -u github.com/guumaster/textifier```
## Module Usage
```
package mainimport (
"fmt"
"github.com/guumaster/textifier/pkg/transform"
)func main() {
f := transform.Compose(
transform.CircleInverse,
transform.Spacer,
transform.Emoji,
)fmt.Println(f(":boom: Hello World :beer:"))
}
// Output:
// 💥 🅗 🅔 🅛 🅛 🅞 🅦 🅞 🅡 🅛 🅓 🍺```
[Run in playground](https://play.golang.org/p/kZK8MZTeTLH)## CLI Usage
```
$> textifier -s -q "hello world"
// Output:
// 🄷 🄴 🄻 🄻 🄾 🅆 🄾 🅁 🄻 🄳
```## CLI Options
```
USAGE:
textifier
cat some_file | textifierCOMMANDS:
help, h Shows a list of commands or help for one commandGLOBAL OPTIONS:
--table, -t adds the flip table guy (default: false)
--circle, -c circled letters (default: false)
--square, -q boxed letters (default: false)
--double, -d double strike letters (default: false)
--upper, -u uppercase all letters (default: false)
--inverse, -i inverse colors (only for square and circle) (default: false)
--space, -s add spaces between letters (default: false)
--emoji, -e parse emoji icons (default: false)
--mirror, -m reverse direction (default: false)
--help, -h show help (default: false)
--version, -v print the version (default: false)
```## References
* Uses [urfave/cli](https://github.com/urfave/cli) to run as CLI.
* Uses [kyokomi/emoji](https://github.com/kyokomi/emoji) to parse emojis.## License
[MIT license](LICENSE)