https://github.com/terasakisatoshi/terminalgat.jl
Unofficial Julia interface for `gat` (cat alternative written in Go)
https://github.com/terasakisatoshi/terminalgat.jl
Last synced: 6 months ago
JSON representation
Unofficial Julia interface for `gat` (cat alternative written in Go)
- Host: GitHub
- URL: https://github.com/terasakisatoshi/terminalgat.jl
- Owner: terasakisatoshi
- License: mit
- Created: 2024-05-11T09:55:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-29T14:40:30.000Z (7 months ago)
- Last Synced: 2024-11-29T14:40:44.576Z (7 months ago)
- Language: Julia
- Size: 38.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
⚠️
This repository is deprecated. Please use https://github.com/AtelierArith/TerminalGat.jl instead.
---
# TerminalGat [](https://github.com/terasakisatoshi/TerminalGat.jl/actions/workflows/CI.yml?query=branch%3Amain) [](https://terasakisatoshi.github.io/TerminalGat.jl/stable/) [](https://terasakisatoshi.github.io/TerminalGat.jl/dev/)
## Description
Unofficial Julia interface for [`gat`](https://github.com/koki-develop/gat)
## Setup
- Install Julia
- Clone this repository```console
$ git clone https://github.com/terasakisatoshi/TerminalGat.jl.git
$ cd TerminalGat.jl
```- Install [terasakisatoshi/gat_jll.jl](https://github.com/terasakisatoshi/gat_jll.jl) which is an autogenerated package constructed using [BinaryBuilder.jl](https://docs.binarybuilder.org/stable/) based on the original [gat v0.17.0](https://github.com/koki-develop/gat/releases/tag/v0.17.0). Run the following commands:
```julia
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.3 (2024-04-30)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |julia> using Pkg; Pkg.activate(".") # activate this project
julia> ] # switch to Pkg REPL
(TerminalGat) pkg> dev --local https://github.com/terasakisatoshi/gat_jll.jl.git
(TerminalGat) pkg> # press Ctrl+C to back to julian mode
julia> exit()
```## How to use
Our Julia package `TerminalGat.jl` exports `gat`, and `gess` functions.
### `gat`
```julia
julia> using TerminalGat
julia> gat("Project.toml")
```Internally, our package uses [JuliaDocs/IOCapture.jl](https://github.com/JuliaDocs/IOCapture.jl) to capture the standard output generated by the go binary `gat`.
If your terminal supports Sixel, you can print images.
```julia
julia> using TerminalGat
julia> using Plots; plot(sin); savefig("sin.png")
julia> gat("sin.png")
```### `gess`
`gess` works something like `gat` + `less`:
```julia
julia> using TerminalGat
julia> gess("Project.toml")
```Internally, our package uses [`ronisbr/TerminalPager.jl`](https://github.com/ronisbr/TerminalPager.jl) to scroll through content that does not fit in the screen.