https://github.com/sweetbbak/lcat
Kitty graphics Go library and CLI tool for displaying images in the terminal.
https://github.com/sweetbbak/lcat
Last synced: 4 months ago
JSON representation
Kitty graphics Go library and CLI tool for displaying images in the terminal.
- Host: GitHub
- URL: https://github.com/sweetbbak/lcat
- Owner: sweetbbak
- Created: 2024-06-09T23:12:49.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-14T03:54:55.000Z (12 months ago)
- Last Synced: 2024-06-19T03:10:37.713Z (12 months ago)
- Language: Go
- Size: 2.53 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lcat
A Kitty Terminal graphics CLI tool and Library.

## The lcat CLI tool
if you are familiar with `icat` then the options are basically the exact same.
```sh
lcat --align=left img.png
lcat --place=10x10@0x0 img.png
```## As a Library
```go
package main
import (
"log"
"os""github.com/jessevdk/go-flags"
"github.com/sweetbbak/lcat/icat"
)func lcat(args []string, opt Opts) error {
var optss = &icat.Options{
Align: opt.Align,
Place: opt.Place,
ScaleUp: opt.ScaleUp,
Background: opt.Background,
Mirror: opt.Mirror,
TransferMode: opt.TransferMode,
Clear: opt.Clear,
DetectSupport: opt.DetectSupport,
DetectionTimeout: opt.DetectionTimeout,
UseWindowSize: opt.UseWindowSize,
PrintWindowSize: opt.PrintWindowSize,
Stdin: opt.Stdin,
Engine: opt.Engine,
ZIndex: opt.ZIndex,
Loop: opt.Loop,
Hold: opt.Hold,
UnicodePlaceholder: opt.UnicodePlaceholder,
Passthrough: opt.Passthrough,
ImageId: opt.ImageId,
}_, err := icat.Icat(optss, args)
if err != nil {
return err
}
}
```if you are using `lcat` as a library for a TUI you will want to ensure that STDIN is set to `false` otherwise garbage data will be read
on STDIN and cause an error.