Geektool Humidity mod

Discussion in 'UI Customization' started by hayduek, Jul 12, 2017.

  1. hayduek macrumors newbie

    hayduek

    Joined:
    Sep 18, 2016
    Location:
    On The Beach
    #1
  2. AngerDanger, Jul 15, 2017
    Last edited: Jul 16, 2017

    AngerDanger macrumors 68030

    AngerDanger

    Joined:
    Dec 9, 2008
    #2
    I'd never used GeekTool before. It looks neat. This ought to get you the humidity:

    Code:
    curl --silent "http://www.accuweather.com/en/us/englewood-fl/34223/hourly-weather-forecast/332381" | awk 'FNR==1826 { gsub(/^[ \t]+|[ \t]+$/, ""); print }' | awk '{print "Humidity: " substr($0, 7, 3)}'
     
  3. hayduek thread starter macrumors newbie

    hayduek

    Joined:
    Sep 18, 2016
    Location:
    On The Beach
  4. AngerDanger macrumors 68030

    AngerDanger

    Joined:
    Dec 9, 2008
    #4
    No problem! :)
     
  5. hayduek thread starter macrumors newbie

    hayduek

    Joined:
    Sep 18, 2016
    Location:
    On The Beach
    #5
    Wel, it was working, but it was't accurate. Now I I just have the humidity label with no data. I've tried reloading the script twice :(
     
  6. AngerDanger macrumors 68030

    AngerDanger

    Joined:
    Dec 9, 2008
    #6
    Alright, I tweaked the code (I was pulling the humidity from the next hour, not the current one) and updated my original post.
     
  7. hayduek thread starter macrumors newbie

    hayduek

    Joined:
    Sep 18, 2016
    Location:
    On The Beach
    #7
    Great! Thanks! Working again, and closer to the output of weather.com.
     
  8. AngerDanger macrumors 68030

    AngerDanger

    Joined:
    Dec 9, 2008
    #8
  9. hayduek thread starter macrumors newbie

    hayduek

    Joined:
    Sep 18, 2016
    Location:
    On The Beach
    #9
    Thanks bro! The GREP argument fixed it! It's still off, but I think with some mods I can get it more accurate.
     

Share This Page