Jump to content

jmealins

Member
  • Posts

    5
  • Joined

  • Last visited

Everything posted by jmealins

  1. @jdfwarrior is the source for this posted on github anywhere? I will gladly fork it and implement the forecast.io API version of it. Just did it for the version that Nick mentioned in a few posts back and I believe these are both written in PHP. Loving the new alfred 2 workflows.
  2. For those who are watching. I modified the darksky.php script to support the latest forecast.io API. I didn't fork Nick Wynja's version on github as it isn't the most recent Alfred 2 version. To get my modified version of the script, go here: https://www.box.com/s/xct1160ftcjlekaa7qqc To replace the version that exists in the current plugin, double click on the Run Script icon in the workflow editor, find open workflow folder and drag and drop the script into the list view (remember to click replace). Again, if you wish to use this I would suggest grabbing your own API key. Feel free to do whatever you wish with this.
  3. FWIW, I just started getting {"403":"Forbidden"} with my new API key. I am taking a wild guess that any new API key signups don't have access to the v1 version of the Dark Sky API as it seems they have just pushed the v2 version of the API. Being that they just released forecast.io, its quite plausible. As far as installing another app I agree, its not a very clean solution. I am going to look at using javascript to get alfred to trigger the Location Services API via Safari or some such method. If I have a little more time today I will fork darksky.php and update it to use the v2 API.
  4. Hmm. my workflow script looks like this. The only thing that is different is I am using my own API key. # This API key is mine but I'll let you use it for now. # If this stops working, get your own at # https://developer.darkskyapp.com/register KEY="<using my own API key>" # Look up your location at # http://stevemorse.org/jcal/latlon.php # Don't use more than 4 decimal points read LAT LON <<< `/Applications/whereami | awk '/Latitude:|Longitude:/ { printf "%0.4f ", $2 }'` # Set METRIC to true to return temperature in celcius. Otherwise returns in fahrenheit METRIC="false" php -f darksky.php -- "{query}" $KEY $LAT $LON $METRIC
  5. Here is something I added to the workflow so that it would find the weather wherever I am. It requires you to download a program called whereami (that accesses corelocation API's). The developer has posted the source on github and has built and signed the binary so that it works on Mountain Lion. http://robmathers.github.com/WhereAmI/ (To Note: Place it in /Applications) add this line into the bash script to replace LAT LON in the workflow. read LAT LON <<< `/Applications/whereami | awk '/Latitude:|Longitude:/ { printf "%0.4f ", $2 }'`
×
×
  • Create New...