Giter VIP home page Giter VIP logo

poketex's Introduction

๐Ÿ“– Poketex

Simple Pokedex based on TUI(Terminal User Interface)

Crates.io Crates.io

demo

Table of Contents

Feature

  1. All Pokemon (until Pokemon SV)
  2. All Region Form (until Pokemon SV)
  3. Searchable
  4. include English, Chinese, Japanese locales data

Installation

Packaging status

Install from Github Release

Download the last version binary depending on your configuration here: Release Page

Then you just need to enter this command in your terminal:

tar -xf <downloaded_archive> poketext
sudo mv poketex /usr/local/bin
sudo mkdir -p /usr/local/share/poketex/colorscripts
sudo cp -rf colorscripts /usr/local/share/poketex

Install from crates.io

If you're a Rust programmer, poketex can be installed with cargo.

cargo install poketex --locked

Install from the AUR

If you're using Arch Linux, you can install poketex from the extra repository using pacman:

pacman -S poketex

Install from Source Code

poketex is written in Rust, so you'll need to grab a Rust installation in order to compile it.

git clone https://github.com/ckaznable/poketex
cd poketex
make build
sudo make install

If you want to uninstall

sudo make uninsall

Usage

Usage: poketex [OPTIONS]

Options:
  -l, --locale <LOCALE>  locales [zh, ja, en] [default: en]
  -h, --help             Print help
  -V, --version          Print version

Keyboard Navigation Instructions

Use arrow keys or hjkl to move around.

Press Page Up or Page Down to move 4 steps at a time.

Press f to switch ascii forms.

Press q to exit.

Press H to display help information.

Press gg to go to the top and G to go to the bottom.

Press alt+j or alt+k to scroll up or down ability description.

Press / to enter search mode.

RoadMap

  • show pokemon iv and type
  • pokemon list searchable
  • add pokemon ability rows
  • add region form
    • Alola
    • Galar
    • Hisuian
    • Paldea
  • add cli variable
    • --locale [en, ja, zh]
  • help key
  • gen 9 DLC - The Teal Mask
  • gen 9 DLC - The Indigo Disk
  • Image support (powered by pokemon-colorscripts)

Troubleshoot

Image are not displaying

If the ansi images are not displaying, please copy the colorscripts folder from this repository to /usr/local/share/poketex.

git clone https://github.com/ckaznable/poketex
cd poketex
mkdir -p /usr/local/share/poketex/colorscripts
cp -rf colorscripts /usr/local/share/poketex

Pokemon data source

data generated from ckaznable/poke-data-crawler

License

MIT

poketex's People

Contributors

ckaznable avatar dependabot[bot] avatar non-descriptive avatar orhun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

poketex's Issues

Image support

I think it would be pretty cool if Poketex could show a pixelated, bitmap like sprite of the Pokemon, besides the stats table, on the left side of it. Browsing through Serebii, I found that it's pretty easy to fetch the image. Since most terminals don't support full-res image rendering, a low-res icon could be used instead. The links can be constructed in this way:

  • Low-res - https://www.serebii.net/pokedex-sv/icon/<id>.png
  • High-res - https://www.serebii.net/pokemon/art/<id>.png

where <id> is the global Pokedex number of that Pokemon.

`cargo install` failing

Hi there,

just tried to install Poketex using cargo install however it fails with this message:

<Text<'a> as From<Vec<ratatui::text::Line<'a>>>>
    = note: required for `ratatui::text::text::Text<'_>` to implement `Into<Text<'_>>`
note: required by a bound in `Paragraph::<'a>::new`
   --> /home/chris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.25.0/src/widgets/paragraph.rs:116:12
    |
114 |     pub fn new<T>(text: T) -> Paragraph<'a>
    |            --- required by a bound in this associated function
115 |     where
116 |         T: Into<Text<'a>>,
    |            ^^^^^^^^^^^^^^ required by this bound in `Paragraph::<'a>::new`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `poketex` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `poketex v1.11.0`, intermediate artifacts can be found at `/tmp/cargo-installc1s79T`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

From what I can tell it expects Text to implement some trait which it doesn't implement (?).

I'm using cargo and rustc version 1.72.0 if that's of any help. :)

[BUG] Double movement

Looks like it has issues with button handlingsince it handles both up and down states the same time. So when I try to navigate throw list with up/down buttons it does two steps per button.

Tested on windos, but I guess it's non platform related issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.