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

Better representation for Lightning in ASCII Art. #136

Open
jrcharney opened this issue Feb 23, 2019 · 6 comments
Open

Better representation for Lightning in ASCII Art. #136

jrcharney opened this issue Feb 23, 2019 · 6 comments

Comments

@jrcharney
Copy link

jrcharney commented Feb 23, 2019

Originally, I posted this as a response in @chubin/wttr.in#192, but then I realize chubin was using wego.

So as I stated in that report, I'm using KiTTY to access SSH to my Raspberry Pi 3B+ (because I like being a complicated person).

As great as Unicode has blessed us with ASCII symbol (and then Emojis), they almost have not business being in ASCII Art, and from the link I provided, there have been some complications with using the lightning bolt symbol in the forecast ASCII art, of which I can verify that, and my raspberry Pi still has a little bit of an issue rendering some of the Nerdfont symbols as that square in the red are should actually be the Raspberry Pi logo, so this screenshot is probably the best view I can get on a non-Linux system over SSH.

But here's the thing: The representation of thunderstorms with lightning feels cheap. Take example this screenshot for the weather report and forecast in Jackson, Mississippi today.

The lightning symbol works great if you are trying to pull up the small version of the forcast to fit it on the status line in TMUX or some other text console app, but for the ACSII representation of weather, it looks bad.

When you render here on Github, it looks like this.

Weather report: Jackson, MS

      .-.      Thunderstorm In Vicinity
     (   ).    82..86 °F
    (___(__)   ↑ 16 mph
   ‚‘⚡‘‚⚡‚‘  9 mi
   ‚’‚’⚡’‚’   0.0 in

So I though about something better. A short Google Search for lightning ASCII Art yielded this example at the bottom of the page.

Since that was too big, I tried shrinking it down a bit and came up with these logos. For all the following case, the lightning bolt would be colored yellow to differentiate that from rain. which would use similar characters. It would be wise that the color of the characters that make up the lightning bolt take precedence over the colors making the clouds or precipitation.

    __       Lightning bolt (raw, no clouds or precip.)
   / /_,
  /_ ,'
   /'

   .--.      Thunderstorm (small cloud, no precip.)
  ( __ ).
 (_/ /_,_)
  /_ ,'
   /'
   
_`/"".--.      Thunderstorm (small cloud, no precip. with sun)
 ,\_( __ ).
  /(_/ /_,_)
    /_ ,'
     /'

_`/"".--.      Thunderstorm (small cloud, light rain. with sun)
 ,\_( __ ).
  /(_/ /_,_)
   ‘/_ ,' ‘
  ‘ ‘/' ‘ ‘

_`/"".--.      Thunderstorm (small cloud, light moderate/heavy rain. with sun)
 ,\_( __ ).
  /(_/ /_,_)
  ‚‘/_ ,'‚‘
  ‚‘,/'‚‘‚‘
	 
_`/"".--.      Thundersnow (small cloud, snow. with sun)
 ,\_( __ ).
  /(_/ /_,_)
   */_ ,'*
  * */'*

In the above version, I made the small cloud a little wider to better define the lightning bolts' appearance. This next set would apply the ASCII art lightning bolt a little better.

    .--.		Thunderstorm (large cloud, no precip., lightning more centered)
 .-( __ ).  
(__./ /___)
   /_ ,'
    /'
	
     .--.		Thunderstorm (large cloud, light rain, lightning more centered)
  .-( __ ).  
 (__./ /___)
 ‘ ‘/_ ,' ‘
‘ ‘ ‘/'‘ ‘

     .--.		Thunderstorm (large cloud, heavy/moderate rain, lightning more centered)
  .-( __ ).  
 (__./ /___)
‚‘‚‘/_ ,'‚‘
‚‘‚‘,/'‚‘‚‘

     .--.		Thundersnow (large cloud, snow, lightning more centered)
  .-( __ ).  
 (__./ /___)
 * */_ ,'* *
* * */' * *

Overall, I think these would look better (especially once they are colored) that the current art.

I didn't include an art for the various types of winter weather but I would be interesting to see what that looks like.

I'm also think of how to better represent duststorms (which don't really have lightning in them all the time, but could), smoke, haze, fire danger, and windy weather. (While I applaud the color coding of temperature and wind speeds. Some terminals do support bold and italic fonts. (Why those aren't used by default is something the Linux and SSH folks should really look into, but is beyond the scope of this project.

Other than that, I really like this project and would love to help make some contributions to it.

Keep up the good work!

@schachmat
Copy link
Owner

Your issue with the weird display may be due to your terminal setup not supporting the blinking attribute correctly (the zap icons are toggled on and off periodically) and doing something weird with the background color instead.

I don't like the large zap, but I'd be open for a PR on switching to one or two simple ones like this:

/_
 /

@jrcharney
Copy link
Author

OK. My version just fleshed out the lightning bolt just a little bit.

Blinking icons and text are have been for the most part discouraged for accessibility reasons, especially if the user has photosensitivity issues (i.e. epilepsy or some visual disability).

There's a history about blinking text in Wired magazine.

@schachmat
Copy link
Owner

Ack. Feel free to provide a config option that disables the blinking in another PR.

@jrcharney
Copy link
Author

Ack. Feel free to provide a config option that disables the blinking in another PR.

I'm still a little bit of a noob when it comes to understanding git, I'm not exactly sure how I can contribute to another person's project.

Regardless, emojis shouldn't be animated, IIRC. If they are, that sounds like something that was implemented by Apple or Google. (I saw animated emojis in my Gmail a few times in the subject title, but just about all of those emails were sent to spam because they were.)

That's probably another good reason not to use the lightning emoji except in the case where you make the weather report the conditions in that small format except in the small format for use in like a tmux status bar. (See wttr.in?format=3)

I kinda wish I knew an app were I could tinker with ASCII art with color and it would save the output with color sequences exported. (I know how to use color sequences in Bash. I even made the extra effort to set up my SSH to use 256 colors.)

@jrcharney
Copy link
Author

Also, I'm pretty sure blinking text is not enabled by default and it should be prevented from being used in the first place. No JSON config required.

@tbergeron
Copy link

Since this is the only issue I've seen about the subject. This is making my conky setup bug. Does anyone know if it's possible to enable blinking text in conky OR a way to disable this in wego? Here's how it looks:
Screenshot from 2019-04-20 18-20-15
Thanks!

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

3 participants