Jump to content

conigs

Member
  • Posts

    10
  • Joined

  • Last visited

Posts posted by conigs

  1. Thanks. I registered for the API key, set the location as specified in the very first post of this thread, and I got an "invalid response - not JSON object" error. Any ideas why I'm getting this?

    Do you mind posting your settings.plist file, or letting me know what's in the location string?

  2. Hi, if I set the units, the workflow no longer works. It says that it returned a non-JSON file. I do prefer US units, but I am getting use to metric. BTW: My location is Thailand. My only other problem is that it is much slower than others.

     

    I'm not sure what would be causing that. If you open up the workflow folder, what is in the units setting? It should be either 'us','si','uk', or 'default'. I thought I had accounted for errors but I might have missed something.

     

     

    Hi conigs, thank you for your modification, love the Workflow!

     

    I have one request: Is it possible to fix the order of the rows to now, whole day, tomorrow and next week? Because if I select the forecast for next week and go on the website, it afterwards is in the top row. That can get confusing, I find. But maybe that's just me, just a suggestion :)

     

    Thanks anyway!

    That's Alfred re-ordering rows based on usage. I'm still pretty green to script filters and am not sure what the best way to override this would be.

     

     

    Amazes me that people are loving the icons because I originally used those in my weather workflow and people complained.. *sigh*

    To each their own I guess. I wonder how much of that has to do with getting those comments before Alfred was opened up to non-mega supporters?

     

     

    Oh, and I have another request: Would it be possible to fix the location manually? I use VPN and Unblock-US and am not really sure that that doesn't influence the IP Location stuff. A short experiment on some IP geolocation site I found to be half a continent off, for example. And a fixed location could help the speed to, right?

     

     

    Seconding this. Being able to enter the location manually would be great!

     

    Someone else made that comment and helped out with some code on github, but I never updated the workflow link. This should allow you to set location now.

  3. This is great, thanks. Is there any way to have it return ºC, or is that supposed to happen on the API side? I have forecast.io set to ºC, but the workflow keeps returning ºF.

     

    It's based on the country code of the location returned from the IP lookup. It would be possible to set a preference for it. In the mean time, you could edit line 45 of forecast.php to be 

     

    $units = 'si';
    

     

     and that should take care of it.

  4. So I've been playing with this a lot today and decided to release it. @nickwynja, let me know if you're not okay with the info in the read-me. I feel I've sufficiently modified the workflow, but haven't used github and don't know how to make branches, etc.

     

    Regardless, here's my Forecast.io workflow to try out. To set it up, you'll need your own developer API. You can paste it right into the workflow by entering 'w k <api-string-here>'. For convenience, links to register or login to Forecast for Developers are included. The theme can be changed by entering 'w t' and selecting light or dark. Forecast data has been reconfigured to get a little more info in there and (hopefully) handle different times of day nicely.

     

    I've also changed the way it handles US/UK/SI units directly from the forecast api, so it shouldn't have to convert anything.

     

    Image%202013.04.02%2011:22:40%20PM.png

    Screen%20Shot%202013-04-02%20at%2011.23.

    Image%202013.04.02%2011:24:56%20PM.png

    [update: branched nickwynja's code on github.]

  5. For anyone interested, I've modified the workflow quite a bit:

    Screen%20Shot%202013-04-02%20at%2010.09.

    Changes:

    • Added weather icons (Climacons)
    • Ability to set a dark or light theme ('w theme' command)
    • Modified results to get a little more info in there
    • Selecting any result will launch Forecast.io in the default browser

    Still have to do some testing to make sure the results work will in various times throughout the day.

  6. That didn't work for me. :(

     

    I changed line 169 to:

    $w->result( 'weather', 'http://www.wunderground.com'.$location, $weather-display_location->full.": ".$weather->weather, round($weather->temp_f).'°F | Feels Like '.$weather-feelslike_f.'°F | Wind '.lcfirst($weather->wind_string) , $icon );
    

     

    And line 171 to:

    $w->result( 'weather', 'http://www.wunderground.com'.$location, $weather->display_location->full.": ".$weather->weather, round($weather->temp_c).'°C | Feels Like '.$weather->feelslike_c.'°C | Wind '.lcfirst($weather->wind_string) , $icon );
    

     

    "Feels Like" will not be displayed. Still got only "High - Low - Precipitation". 

    It looks like you're missing a character in your feelslike string. Should be $weather->feelslike_f.

  7. For anyone curious, I changed line 169 in weather.php to give a little more information…

     

    Changed

    $w->result( 'weather', 'http://www.wunderground.com'.$location, $weather->display_location->full.": ".$weather->weather, $weather->temp_f.'°F ('.$weather->temp_c.'°C)' , $icon );
    

     

    to

    $w->result( 'weather', 'http://www.wunderground.com'.$location, $weather->display_location->full.": ".$weather->weather, round($weather->temp_f).'°F | Feels Like '.$weather->feelslike_f.'°F | Wind '.lcfirst($weather->wind_string) , $icon );
    

     

    So now it looks like:

    image.jpg

    (And yes, it's cold here.)

×
×
  • Create New...