Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terasakisatoshi/terminalgat.jl
Unofficial Julia interface for `gat` (cat alternative written in Go)
https://github.com/terasakisatoshi/terminalgat.jl
Last synced: 3 days 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 (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-25T12:07:23.000Z (6 months ago)
- Last Synced: 2024-10-12T12:40:01.242Z (about 1 month ago)
- Language: Dockerfile
- 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
# TerminalGat [![Build Status](https://github.com/terasakisatoshi/TerminalGat.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/terasakisatoshi/TerminalGat.jl/actions/workflows/CI.yml?query=branch%3Amain) [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://terasakisatoshi.github.io/TerminalGat.jl/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](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.