Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random forms don't work #7

Open
Blakeinstein opened this issue Aug 20, 2022 · 12 comments
Open

Random forms don't work #7

Blakeinstein opened this issue Aug 20, 2022 · 12 comments

Comments

@Blakeinstein
Copy link

I am running into issues against shuf missing in osx.

Looking on the internet, I need to install coreutils but that installs shuf as gshuf.

What do I do?

And can I pipe the output of this to neofetch? (using command output?)

@acxz
Copy link
Owner

acxz commented Aug 20, 2022

Can you post the command you ran and the output of the command?

Make sure to copy paste the next empty prompt that shows up right after running the command.

As for piping the output to neofetch, I think its possible but not sure off the top of my head. Let me think about that one for a bit.

@Blakeinstein
Copy link
Author

apparently coreutils does a link for shuf,
but on osx ,
big doesnt work correctly,
Screen Shot 2022-08-20 at 2 50 15 PM

animated flag throws an error

 ╭─blaine@Daedalus.local in repo: pokeshell on  master as 🧙 took 1s
 ╰─λ pokeshell -a random
not-shiny:tapu-bulu+female
convert: improper image header `/Users/blaine/.cache/pokeshell/not-shiny:tapu-bulu+female.gif' @ error/gif.c/ReadGIFImage/1029.
convert: no images defined `/Users/blaine/.cache/pokeshell/not-shiny:tapu-bulu+female.giff' @ error/convert.c/ConvertImageCommand/3342.
identify: unable to open image '/Users/blaine/.cache/pokeshell/not-shiny:tapu-bulu+female.giff': No such file or directory @ error/blob.c/OpenBlob/3568.
identify: no decode delegate for this image format `GIFF' @ error/constitute.c/ReadImage/741.
identify: unable to open image '/Users/blaine/.cache/pokeshell/not-shiny:tapu-bulu+female.giff': No such file or directory @ error/blob.c/OpenBlob/3568.
identify: no decode delegate for this image format `GIFF' @ error/constitute.c/ReadImage/741.
convert: unable to open image '/Users/blaine/.cache/pokeshell/not-shiny:tapu-bulu+female.giff': No such file or directory @ error/blob.c/OpenBlob/3568.
convert: no decode delegate for this image format `GIFF' @ error/constitute.c/ReadImage/741.
convert: no images defined `/Users/blaine/.cache/pokeshell/t.gif' @ error/convert.c/ConvertImageCommand/3342.
convert: unable to open image '/Users/blaine/.cache/pokeshell/t.gif': No such file or directory @ error/blob.c/OpenBlob/3568.
convert: no images defined `/Users/blaine/.cache/pokeshell/t.gif' @ error/convert.c/ConvertImageCommand/3342.
chafa: Failed to open '/Users/blaine/.cache/pokeshell/t.gif': No such file or directory

@acxz
Copy link
Owner

acxz commented Aug 20, 2022

apparently coreutils does a link for shuf,

Great! Glad to hear that works on your machine.

big doesnt work correctly,

I'm guessing you are using iTerm2?
I think I know the issue there. Can you try again with the latest commit: e4556d3

pokeshell -a tapu-bulu

You seem to have found an edge case, there is a bug with random and forms.

@acxz acxz changed the title OSX support? Random forms don't work Aug 20, 2022
@Blakeinstein
Copy link
Author

I'm guessing you are using iTerm2? I think I know the issue there.

I genuinely apologize for not mentioning the terminal emulator. I am using kitty. This seems to have worked
Screen Shot 2022-08-20 at 7 13 16 PM

funny it picked numel only

pokeshell -a tapu-bulu

 ╭─blaine@Daedalus.local in repo: pokeshell on  master as 🧙 took 5ms
 ╰─λ pokeshell -a tapu-bulu
convert: improper image header `/Users/blaine/.cache/pokeshell/not-shiny:tapu-bulu+male.gif' @ error/gif.c/ReadGIFImage/1029.
convert: no images defined `/Users/blaine/.cache/pokeshell/not-shiny:tapu-bulu+male.giff' @ error/convert.c/ConvertImageCommand/3342.
identify: unable to open image '/Users/blaine/.cache/pokeshell/not-shiny:tapu-bulu+male.giff': No such file or directory @ error/blob.c/OpenBlob/3568.
identify: no decode delegate for this image format `GIFF' @ error/constitute.c/ReadImage/741.
identify: unable to open image '/Users/blaine/.cache/pokeshell/not-shiny:tapu-bulu+male.giff': No such file or directory @ error/blob.c/OpenBlob/3568.
identify: no decode delegate for this image format `GIFF' @ error/constitute.c/ReadImage/741.
convert: unable to open image '/Users/blaine/.cache/pokeshell/not-shiny:tapu-bulu+male.giff': No such file or directory @ error/blob.c/OpenBlob/3568.
convert: no decode delegate for this image format `GIFF' @ error/constitute.c/ReadImage/741.
convert: no images defined `/Users/blaine/.cache/pokeshell/t.gif' @ error/convert.c/ConvertImageCommand/3342.
convert: unable to open image '/Users/blaine/.cache/pokeshell/t.gif': No such file or directory @ error/blob.c/OpenBlob/3568.
convert: no images defined `/Users/blaine/.cache/pokeshell/t.gif' @ error/convert.c/ConvertImageCommand/3342.
chafa: Failed to open '/Users/blaine/.cache/pokeshell/t.gif': No such file or directory

running pokeshell -a -b random gave me the following
Screen Shot 2022-08-20 at 7 11 59 PM

and yes this was animated

I am genuinely interested in piping the output to neofetch, and possibly using the kitty backend to display the image.

@acxz
Copy link
Owner

acxz commented Aug 21, 2022

This seems to have worked

Sweet! Yea both iTerm2 and kitty backends had that issue where they wouldn't necessarily upscale.

funny it picked numel only

Looks like ur lucky pokemon of the day!

pokeshell -a -b random

Basically the script is trying to find a animated sprite for a pokemon called -b, which doesn't exist. I should check and suppress error output for invalid pokemon.

@Blakeinstein
Copy link
Author

hmm makes sense, how do i supress the random title? plugging pokeshell -b random to neofetch gives me this

Screen Shot 2022-08-20 at 8 46 37 PM

@acxz
Copy link
Owner

acxz commented Aug 21, 2022

how do i supress the random title?

I'll have to add an option for that

plugging pokeshell -b random to neofetch gives me this

Nice some progress, hmm maybe I could separate the display from fetching the images. Then you could just use the output of that directly in neofetch, although it may not look as good since chafa doesn't have a pixel perfect mode.

If you want to piggy back off of your cached images, try this in your neofetch config:

image_backend="chafa"
image_source="/home/<USER>/.cache/pokeshell/"
crop_mode="none"
image_size="auto"

Note: you should tweak image_size based on your liking and crop_mode=none is sort of a hack since it uses neofetch's internal api, if u can even call it that.

I'll make a faq on try to improve the neofetch experience once I iron out some of the more fundamental issues, like chafa pixel perfect and random forms.

@Blakeinstein
Copy link
Author

i see, the resolution isnt soo good and I cant get a fast response time either. Will leave configuring this for now.

Thanks btw! You can close this issue whenever you see fit!

@acxz
Copy link
Owner

acxz commented Sep 5, 2022

@Blakeinstein I believe with hyfetch you can get the results that you want. See the following README section: https://github.com/acxz/pokeshell#hyfetch

Right now only ascii works well, but I'll add true image soon as well.

For a fast response, you'll have to use pokescript (neo branch) which I still need to write the readme for, but is usable.

@Blakeinstein
Copy link
Author

@Blakeinstein I believe with hyfetch you can get the results that you want. See the following README section: https://github.com/acxz/pokeshell#hyfetch

I figured the same, I also posted this solution on pokeshell alternatives as well. Only speed is the problem now haha, maybe animated sprites would work someday too.

@acxz
Copy link
Owner

acxz commented Sep 5, 2022

animated sprites would work someday

Should be possible, just need to display the text before the gif and that should work.
I'll ping back when pokescript is easier to use, but if you do get around to trying let me know if it is fast enough for you.

@acxz
Copy link
Owner

acxz commented Nov 11, 2024

pokemon that have issues (most likely because they have forms)

Here is a non exhaustive list of pokemons causing a bug. I only found those by chance, the complete list is probably much larger:
deerling
basculin
scatterbug
flabebe
giratina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants