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

Fix PNG rendering #919

Open
chubin opened this issue Sep 25, 2023 · 16 comments
Open

Fix PNG rendering #919

chubin opened this issue Sep 25, 2023 · 16 comments
Assignees

Comments

@chubin
Copy link
Owner

chubin commented Sep 25, 2023

PNG rendering is temporary disabled.

$ curl wttr.in/Nuremberg.png
PNG support temporary disabled
This was referenced Sep 25, 2023
@edi9999
Copy link

edi9999 commented Sep 29, 2023

Same issue for me :)

@truerico
Copy link

truerico commented Oct 4, 2023

same issue here too

@lecoxsportif
Copy link

same

@morfeus2
Copy link

Any idea why was it disabled?

@Intellek-help
Copy link

Can't find any info on why it has been disabled, is this only the png image or emojis too?

@edi9999
Copy link

edi9999 commented Oct 17, 2023

Here is what I use now as a replacement :

img="$(mktemp /tmp/weather_XXXX.png)"
textimg -i "$(curl --silent "wttr.in/$town?q")" -F 30 -o "$img"
ristretto "$img"

textimg can be installed here : go install github.com/jiro4989/textimg/v3@latest

@liam8888999
Copy link

is there any update on this

@chubin
Copy link
Owner Author

chubin commented Nov 12, 2023

I started porting the existing Python implementation to Go (the Python implementation is too slow for the current load level). Let me know if you want to help

@chubin chubin self-assigned this Nov 12, 2023
@nirvam
Copy link

nirvam commented Nov 14, 2023

I started porting the existing Python implementation to Go (the Python implementation is too slow for the current load level). Let me know if you want to help

@chubin edi9999 metioned https://github.com/jiro4989/textimg in his workaround, which seems a good module for ANSI text to PNG conversion.

@chubin
Copy link
Owner Author

chubin commented Nov 14, 2023

I've skimmed through it, and it seems to be pretty fit for our needs. It has emoji support, wide runes, true colors, etc. I will play with it, and check how easy it could be integrated

@edi9999
Copy link

edi9999 commented Nov 14, 2023

The only bug I had so far was when there was a "thunderstorm alert". In the terminal, it shows as an animated "thunder" icon.
In that case, the PNG output had some strange chafracters with textimg.

But that was the only issue I had in several weeks of usage.

@morfeus2
Copy link

I started porting the existing Python implementation to Go (the Python implementation is too slow for the current load level). Let me know if you want to help

Now I understand, good to know the motivation.
Unfortunately I don't know Go at all, otherwise I would have offered my help.

@ivan-ristovic
Copy link

@chubin edi9999 metioned https://github.com/jiro4989/textimg in his workaround, which seems a good module for ANSI text to PNG conversion.

I've skimmed through it, and it seems to be pretty fit for our needs. It has emoji support, wide runes, true colors, etc. I will play with it, and check how easy it could be integrated

Seems great and efficient for v1 output. I couldn't make it work with the v2 output though (only the weather icons worked well but not the graph itself). If anyone else managed to make it work, please share.

@edi9999
Copy link

edi9999 commented Nov 20, 2023

Yes indeed, with the v2 output the textimg software doesn't give the right output ... (for the graph)

@edi9999
Copy link

edi9999 commented Dec 29, 2023

For example, the thunderstorm output is buggy with the textimg utility :

image

@sholl
Copy link

sholl commented May 3, 2024

Is there any progres on this issue?

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

10 participants