Git Product home page Git Product logo

krabby's People

Contributors

yannjor 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

Watchers

 avatar

krabby's Issues

Add column to feature table of pokemon sprite terminal scripts

Hey @yannjor I finally got around to testing your codebase and added a column to the comparison table.

Let me know if you have any qualms or suggestions.

One thing to note, is that the bash script pokeget (cached) is actually faster than krabby (cached). I was wondering if you have any thoughts and if u can also reproduce those results.

Comparing with the old version of the bash script, I get that krabby is 1.3x slower instead of 7x faster.

nix build rust package need cargo.lock files

nix build .#krabby                                  
warning: found empty hash, assuming 'sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA='
warning: error: unable to download 'https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store/61zxvc6ldb8j6292dn5b4bz31n2qlq8d.narinfo': SSL connect error (35); retrying in 308 ms
[1/0/2 built, 0.0 MiB DL] building krabby-0.1.6-vendor.tar.gz (unpackPhase): unpacking source archive /nix/store/gc1yvn29j9ywf9b77jb4
error: builder for '/nix/store/6lks3ql04s2ya00sffn03h0qga6xy19h-krabby-0.1.6-vendor.tar.gz.drv' failed with exit code 1;
       last 10 log lines:
       > patching sources
       > configuring
       > no configure script, doing nothing
       > building
       >
       > ERROR: The Cargo.lock file doesn't exist
       >
       > Cargo.lock is needed to make sure that cargoHash/cargoSha256 doesn't change
       > when the registry is updated.
       >
       For full logs, run 'nix log /nix/store/6lks3ql04s2ya00sffn03h0qga6xy19h-krabby-0.1.6-vendor.tar.gz.drv'.
error: 1 dependencies of derivation '/nix/store/rbnc1dmqxbqkp26rkb81nflfh06cmz70-krabby-0.1.6.drv' failed to build

Add `--shiny` flag to `random` subcommand

name subcommand already has a --shiny flag, which makes it possible to display a shiny version of a specified Pokemon.

random subcommand could also have that flag so that we could get a random shiny Pokemon.

I know it's possible to achieve this by setting the shiny probability to 1 in the configuration file, but a flag would be nice too. I can imagine some use cases with that.

Add option for padding

It would be great to be able to specify a number of spaced for padding (e.g., on the left). This would allow having an output like (sorry, the ANSI characters don't render well here on GitHub):

$ krabby random --padding-left 8
        Clefairy
          ▄▀▄ ▄▄▄         
          ▀▀▀▀▀▀▀▀▄▄▄▄▄▄  
          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ 
         ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
         ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
         ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  
             ▀▀▀▀▀▀▀▀▀▀   
                ▀▀ 

instead of

$ krabby random
Clefairy
  ▄▀▄ ▄▄▄         
  ▀▀▀▀▀▀▀▀▄▄▄▄▄▄  
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ 
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  
     ▀▀▀▀▀▀▀▀▀▀   
        ▀▀ 

It would simply mean prefixing every output line with X amount of spaces.

Development PKGBUILD

I was charmed by your project, so I wrote a PKGBUILD that tracks the main branch

pkgbase='krabby-git'
pkgname='krabby-git'
pkgver=0.1.6.r0.g2669909
pkgrel=1
pkgdesc='Print pokemon sprites in your terminal (development version)'
arch=('x86_64')

url='https://github.com/yannjor/krabby'
license=('GPL-3.0')

makedepends=('rust')
conflicts=('krabby')

source=("${pkgname}::git+https://github.com/yannjor/krabby#branch=main")
md5sums=('SKIP')

pkgver() {
    git -C "${pkgname}" describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${pkgname}"

    cargo build --release
}

package() {
    install -Dm755 "${pkgname}/target/release/krabby" -t "${pkgdir}/usr/bin"
    install -Dm644 "${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

I noticed that the krabby-git AUR package is orphaned, perhaps you can adopt it & update it using this script (I would do it myself, but I figured you might prefer to do it yourself considering it's your project). A krabby package might be nice as well; I could write a PKGBUILD for that as well if you want.

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.