lookias.blogg.se

Geektool weather 2015
Geektool weather 2015












geektool weather 2015

# doing it this way gets rid of a preceeding blank line

#GEEKTOOL WEATHER 2015 CODE#

You will need to change the p= value in the URL to your own location code or you'll see what crappy weather we currently have in Edmonton. This script displays current weather conditions. #cpu=$(top -l 1| grep 'Load Avg' | awk '\n" This script displays current uptime as well as RAM and CPU usage on the system. This script displays the calendar for this month with the current day hashed out.Ĭal | sed "s/^/ / s/$/ / s/ $(date +%e) / $(date +%e | sed 's/./#/g') /" This script displays your current local and external IP addresses. They were either written by me or were found elsewhere and adapted/improved or otherwise changed to suit my needs. etc.The following are scripts that I use with GeekTool. make it executable, make sure python is in your path, make sure to give whole path in geektool, nerdtool. If not please modify to suit your needs.Īll the standard stuff applies. You will have to change the following line to reflect your zipcode.

geektool weather 2015

Only needed on location and pressure_string # replace the crazy charaters with white space. # start with first variable and turn into type string and then strip the xml Wu_pressure = dom.getElementsByTagName('pressure_in') Wu_wind = dom.getElementsByTagName('wind_string') Wu_temp = dom.getElementsByTagName('temperature_string') Wu_time = dom.getElementsByTagName('observation_time') # grab the xml elements that we want to use and put into variables # grab the location which is a child element of current_observation and put into variable # finally pass the current closest pws station to wu_url and then to url to get the current observation api Wu_idpws = domarea.getElementsByTagName('id') # will always be the first 'id' element that is run across, the sequence goes # parse the url with minidom looking in this order for the closest pws which #first we need to select the closest online pws station from the location area api # get the url for my local station and put it in variable 'url' # cobbled together by Lee Loncosky 2009 from readings on the web

geektool weather 2015

Maybe someone else can shed more lite on how they scrape the WU mobile site. It is not as good because they do not have cool stuff like conditions, sunset or lunar stuff in their xml data. Long story short, I am now using python and weather undergrounds xml api to get my weather into geektool, nerdtool. When it happened I figured I would just transition my weather scripts over to their official xml api. It has been a good run but the weather underground printing Web site seems to have died. I always have an accurate outdoor temp and wind direction. I have geektool display 8 lines in the bottom left of my desktop. Print join "", can change the script to get the facts you want. # Print the lines of interest in the order I want. # Add a blank line to the front of the array if there isn't.

geektool weather 2015

# Sometimes there's a windchill line, and sometimes there isn't. # second line, so exchange it with the last line. # I want the temperature line to print on the bottom to make it # Keep only certain lines for the current = grep /^ +(Temperature|Wind|Humidity|Conditions|Updated|Observed|Pressure)/, Erase the leading spaces and parenthetical values. I use this command: lynx -dump -width 120 | /Users/lloncosky/library/scripts/lee/weathergeekA I use lynx dump and WU to get instant weather updated every six seconds.














Geektool weather 2015