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

Artifacts are showing up in more complex chara files #51

Open
2 tasks done
dylhack opened this issue Aug 23, 2023 · 5 comments
Open
2 tasks done

Artifacts are showing up in more complex chara files #51

dylhack opened this issue Aug 23, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@dylhack
Copy link
Contributor

dylhack commented Aug 23, 2023

Assurance

  • I have read and understand the contribution guide, and
  • I'm sure there's no relevant issue in this repository

Current Behavior

Weird artifacts are showing up in more complex char files.

image

image

I believe this is because the character tested has multi-letter variable names rather than the usual single-letter variable names.

Steps To Reproduce

# fox.cow is provided at the bottom of this issue
chara say -f ./fox.cow "Hello world"

Expected Behavior

For there not to be characters (text) in the character.

Other Information

@dylhack dylhack added the bug Something isn't working label Aug 23, 2023
@dylhack dylhack changed the title Weird artifacts are showing up in more complex char files Weird artifacts are showing up in more complex chara files Aug 23, 2023
@dylhack dylhack changed the title Weird artifacts are showing up in more complex chara files Artifacts are showing up in more complex chara files Aug 23, 2023
@dylhack
Copy link
Contributor Author

dylhack commented Aug 23, 2023

note: This file was generated by Charc0al's cowsay file converter

@dylhack
Copy link
Contributor Author

dylhack commented Aug 23, 2023

note: it looks like cowsay-apj can interpret it just fine.

image

@vschwaberow
Copy link
Contributor

Any other examples where this doesn't work? This issue is still open and I would like to take a look. So far from what I have been generated on the converter page I haven't find other examples.

@dylhack
Copy link
Contributor Author

dylhack commented Feb 2, 2024

@vschwaberow

Since it's just Perl under the hood, if you replace any single letter variable with multiple letters, then that will reproduce the issue. You need a complex image with multiple color combinations to get the generator to produce it.

As @latipun7 puts it:

Yeah, honestly I'm aware of that issue. It's because there are too many colors, my solution so far is to convert images without true colors, so hopefully there would be less colors (no more than 50 colors)

Original cowsay or cowsay-apj would successfully display that because, essentially cowfile is legit perl code, hence legit variable names. Both are perl code, so they easily read the variables.

While I need to read the cowfile and write a custom parser to read the variables. I still have no idea how to parse $a alone, and not interfere with $ab. Currently all $a would be replaced by the correct color, that's why &ab would be <ansicolor_for_a>b 🥲

@vschwaberow
Copy link
Contributor

Will have a look when time allows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants