Jump to content

Jb_Bryant

Member
  • Posts

    96
  • Joined

  • Last visited

Posts posted by Jb_Bryant

  1. 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.

     

    The modified script doesn't work for me. Just sits here: http://cl.ly/image/0t1g2N3w2W1F

     

    Worked perfect when I reverted back to the old PHP file.

  2. 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
    

     

    Ya I don't know what I did wrong but it's working now. Thanks!

  3. 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 }'`
    

     

    This doesn't work for me. Shows me what @Nick is getting. The one that @nickwynja posted works great for me. Not sure why I can't get whereami to detect my location. Maybe you left out some sort of set up instructions?

  4. I have an extension in Alfred v. 1 that I'm trying to turn into a workflow. The v. 1 extension ran this applescript upon entering "screencast" as the keyword. For the workflow, I'm trying the same thing and it never runs. I've tried:

     

     

    tell application "QuickTime Player"
        start (new screen recording)
    end tell
     
    And
     
    alfred_script(q)
    tell application "QuickTime Player"
        start (new screen recording)
    end tell
    end alfred_script
     
    Am I doing something wrong? I know it says applescripts "work but not finished for beta" but I don't know what that means exactly.

     

  5. I have it working... at least for the current temperature. Still troubleshooting the "today" & "tomorrow" commands. Typing "darksky" will give current weather conditions.

     

    The reason it was not working in your workflow is that you were using Applescript and did not have the darksky.php file inside the folder.

     

    Dark Sky (sort of) for Alfred v2 → http://jrhd.me/ME0F

     

    Why use "Run Script" vs. "Run AppleScript"? I'm not too savvy with code/scripts.

  6. It actually shows where you got the script in the first screen shot in the upper right corner. Here is the original...

     

    http://hackmake.org/2012/11/dark-sky-alfred-extension

     

    I'm playing around with it as well.

     

    I thought it was in there somewhere I just didn't notice it at first glance haha

     

    I have it working... at least for the current temperature. Still troubleshooting the "today" & "tomorrow" commands. Typing "darksky" will give current weather conditions.

     

    The reason it was not working in your workflow is that you were using Applescript and did not have the darksky.php file inside the folder.

     

    Dark Sky (sort of) for Alfred v2 → http://jrhd.me/ME0F

     

    Thanks! I'll give it a try. I only used darksky anyways.

  7. I was using an extension before that would output Dark Sky information. I can't recall where I found this: 

    http://d.pr/i/gMsv

     

    I was using this applescript:

     

     

    # This API key is mine but I'll let you use it for now.
    # If this stops working, get your own at
     
    KEY="066c528cb69bbf39636b07b83bbcdb4c"
     
    # Look up your location at
    # Don't use more than 4 decimal points
     
    LAT="30.2345"
    LON="-81.5642"
     
    php -f darksky.php -- "{query}" $KEY $LAT $LON
     
     
     
    I'm having issues getting this to work in v. 2. The output is displayed as this: http://d.pr/i/s0TQ. 
     
    Is this all set up right? Anyone want to give this a shot?
  8. It may be updating the database. The way it currently runs is.. it checks the last mod time of the database file. If it's changed since the last time the extension ran then it truncates the contents of the database and reloads them all. If you have a lot of bookmarks, it may be taking a second to load them back up. Just a thought?

     

    I've waited quite a bit and it never worked afterwards. I don't feel like I have all that many bookmarks as I store most things in Pinboard. As a workaround I've been deleting the .db file every so often. Kind of a pain though. Also - do you have any idea why Safari bookmarks no longer open in the default browser anymore like they did in Alfred v. 1? Seems Safari is the only option in "Open with" now too.

×
×
  • Create New...