what-anime-tui

command module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

README

What Anime TUI

A TUI alternative to irevenko/what-anime-cli. Wrapper for trace.moe API.

Showcase

https://github.com/mandriota/what-anime-tui/assets/62650188/fc0a4aca-0e20-43b0-a18b-e6b8b9f03694

Installation

Download and install Go from go.dev, then enter the following command in your terminal:

go install github.com/mandriota/what-anime-tui@latest

You may also need to add go/bin directory to PATH environment variable. Enter the following command in your terminal to find go/bin directory:

echo `go env GOPATH`/bin
Using Homebrew
brew tap mandriota/mandriota
brew install what-anime-tui
Using npm
npm i what-anime-tui

Usage

what-anime-tui [-c=/path/to/your/config] [-q] [path]

Where

  • -c specifies the PATH to your configuration file
  • -q, if set, quits the program immediately after displaying first search result
  • path can be either URL or path to local file

These flags can be omitted and you can run:

what-anime-tui

Configuration

By default config is read from ~/.config/wat/wat.toml if -c flag is not set.

Default config:
[appearance]
# Specifies background color by hex or ANSI value.
# Examples:
# background = "#0F0"
# background = "#FF006F"
# background = "6"
background = "6"
# Specifies foreground color by hex or ANSI value.
foreground = "15"

[appearance.border]
# Specifies border foreground color by hex or ANSI value.
foreground = "15"

# Warning: this configuration parameter is unstable and can be changed at any moment
[fetcher]
# API URL to fetch by image/gif URL, which will be passed in the link in place of {{ .Path }}
apiUrlByUrl = "https://api.trace.moe/search?anilistInfo&url={{ .Path }}"
# API URL to fetch by image/gif file, which will be passed in "image" field in multipart
apiUrlByFile = "https://api.trace.moe/search?anilistInfo"

Documentation

Overview

Copyright 2023 Mark Mandriota

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL