

I’ve been made aware that some countries cannot use a zip code so here is an example to get the weather by longitude and latitude, automated so it will change as you move your laptop. If you made them let me know and I’ll gladly give you credit. I’ve included some cool icons that I found in the download, but I could not find who made them. Pretty easy stuff, but if you need assistance give me a shout. #! /usr/bin/pythonįor line in sorted(open(sysLogPath, "r"), reverse=1): So how about reading the system log? Even easier. ReplaceIcon = "/Users/mohawke/Geektool/weather.png"

LocalIcon = "/Users/mohawke/Geektool/Symbols/%s.png" %myWeather.split('.') To run in Geektool, open shell and add: python /path/to/your/weather.pyĭon't forget the change the paths to the image files below.įorcasts.append(i+': '+i+'\n') Including the weather icon buy pointing to your icon set or change You can now simply build your output from a simple key/val dictionary 'title': dom.getElementsByTagName('title').firstChild.data, Geektool runs in a subshell and does not use custom PATHs specified in your. If youre using the gem and RVM you need to include and extra line in the command. For time sensitive scripts like weather youll probably want to set a refresh time of 30-60 seconds. 'current_temp': ycondition.getAttribute('temp'), You should immediately see output on your desktop. session from October 2016, we explore the basics of editor scripting.
#GEEKTOOL SCRIPTS 2016 FOR MAC#
'current_condition': ycondition.getAttribute('text'), Create the script in Unity like normal, but instead of double clicking it to open. Geektool Geeklets Xenoblade 2 Master Mods Mamiya 6 Serial Numbers Fallout 4 Visible Body Application X Mplayer2 Plugin Chrome Chrome Offline Bagas31 Anne Of Green Gables Watch Camworks Post Processor Download Mouse Button 4 Back Disabled Obs Studio For Mac 10.9. Ycondition = dom.getElementsByTagNameNS(WEATHER_NS, 'condition') Weather_icon = get_attribute(results, 'src')įor node in dom.getElementsByTagNameNS(WEATHER_NS, 'forecast'): Res = re.search(r'%s="(.*?)"' % attr, html)Ĭ = subprocess.Popen(, stdout=subprocess.PIPE)

It also will download an animated radar image and gets the weather icon file that you can map to your own icons or, with a minor code edit, download directly from Yahoo. I wrote a Python script as an example to do some weather stuff, which can be edited to work behind the scenes or to directly display weather in Geektool. I had some free time today and was playing with Geektool, which is like the desktop toys I used to play with years ago on Linux – SuperKaramba comes to mind. Python library to make consumption of the data fairly simple. 2016 update: Be aware that Yahoo no longer offers weather data, at least not free. 1, 2019: Some tools you might find useful.Īug.
