Jump to content

altryne

Member
  • Posts

    52
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by altryne

  1. There is no need to copy/paste URL, just use trigger HotKey, check out this wiki issue here:

    https://github.com/hzlzh/Alfred-Workflows/issues/1

     

    There are times when another hotkey is confusing, especially when there are tons of workflows installed, and each is with their own hotkey,

    At those times, I'm sure I would go up to the address bar, copy the url, open alfred, and hit "shorten" and then realize I could have used the hotkey to do that.

    For those times, if you add a url detection inside clipboard, it will save the hustle of pasting it :)

     

    It's very easy with ruby, and I imagine it's equaly easy with python

    url = URI.extract(`osascript -e "get the clipboard"`)

     

  2. Does this work for anyone at all?

    i've tested it a lot with different users on different macs, and it seemed to work, but when I went through the logs guys here who it didn't work for, I saw bugs I couldn't replicate (or understand)

     

    So, does this code work for anybody exept me and all my 4 macs and 2 users? 

    This will greatly save me some time debugging/rewriting if I know that I'm the only one this works for :)

  3. Have a look at Duane Johnson's install_gem.sh script to easily install gems in the workflow's directory. You could also look in to using Bundler and running `bundle install --standalone --clean` after setting up your Gemfile (this is what Zhao Cai's ruby template uses). Bundler basically lets you declare all your dependencies in one file so you can easily install/update them all at once.

     

    If I use bundler, does that mean that everyone who uses the workflow has to have bundler installed? (i'm really new into ruby)

     

     

     

    I am getting the following message when I try to save a URL to Pocket:  "Something went wrong. Try to login again".  The authorization process itself goes through fine and I even get the message that I'm successfully connected to Pocket.  I only get the error message when trying to save a URL.

     

     

    Same for me.

     

    Can you guys please go into the workflow directory, and remove the "token" file from there, and try to login again?

  4. Awesome workflow!

     

    Any chance of adding the ability to browse latest entries or search for items by tag?

     

    It's a bit beyond me right now, I wasn't sure how to use gems with ruby scripts in alfred, so all the code is pure ruby 1.8 (is what ships with mnt lion)

    As the Pocket API returns a json object, serializing it myself is too tough of a job, unless someone can help me with it :)

  5. UPDATE 25/05/13 - rewrote the whole damn thing in python, added aleoop for quick updates

     

    Hey guys, 

    I've finished creating a pocket workflow, I know there are several already in the forums, but this one doesn't require your username/password at any point. (Not that other workflow creators are malicious!)

     

    You can download it here (https://github.com/altryne/pocket_alfred/raw/master/Pocket%20workflow.alfredworkflow)

     

    and all the code on github (the code is a bit of a mess, I was learning ruby as I was writing)

     

     

    Usage : 

    First login with "pocket_login", this will redirect you to the pocket site to authorize

    xOUb+.png

    Afterwards use "pocket" to share a URLs

     

    Supports : 

    • Chrome - if running
    • Safari - if running
    • Clipboard - if contains URL

     

    hhS9+.png

     

    I've banged my head for a long time trying to achieve the sleak oAuth flow, and finally done it, if anyone's interested I can write a blogpost about it.

     

    Lemme know what you think, and what improvements/suggestions you may have.

     

    credits to https://github.com/vitorgalvao/alfred-workflows/blob/master/Pinadd/pinadd for the chrome and safari applescripts

  6. I've brought this up to Andrew in the past for working on things like my AlfredTweet workflow/extension. Twitter for example, I just redirected the user to a page I controlled that started the oauth flow, allowed them to authenticate to Twitter, and then either returned the oob pin code, or just returns the tokens directly and asks the user to paste them back in.

     

    Obviously, you don't want to store username and password and such in plaintext in settings or something, but what about using the security command to save them in the keychain? It can be done very easily. Reading from the keychain is easy as well. If the user knows to only click the "Allow" button and not "Always Allow" then it would always prompt the user before it accessed the keychain.

     

    I know this isn't the best flow for the end user, but it works..

     

     

    Yeah, I know about keychain and the oob pin code concerning Twitter. I know this is not perfect for the user but it works!

    What i am more concerned about is the growing number of APIs (Facebook, Google, Pocket to name just a few) that just won't let you use authentication with PIN code or classic login/password.

     

     

    I have done an Pocket oAuth flow without asking the user for his credentials.

    The way I do it is a bit complicated but it works, and is transparent to the user.

    The workflow post is here : http://www.alfredforum.com/topic/1618-pocket-workflow-with-oauth-login/

×
×
  • Create New...