Jump to content

frankspin

Member
  • Posts

    71
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by frankspin

  1. Curious if you've tried using this for saving multiple keys? I'm getting requests to incorporate multi-org support in my Slack workflow, but Slack requires a seperate token for each organization. I was thinking I could just do a check, but then I realized if you need to re-auth an organization you'll have to replace the existing. I see based on the library I can use store/d data to serialize it for later grabbing. Just not sure if that's going to be the best way to do this, but I'm curious to hear input and feedback.
  2. Question 1: Open Alfred preferences and double click on the action for 'Run NSAppleScript'. It should be attached to the keyword 'slk'. Replace the Applescript with this: on alfred_script(q) tell application "Slack" to activate tell application "System Events" keystroke "k" using {command down} tell process "Slack" to keystroke (q as string) key code 36 end tell end alfred_script Question 2: The Slack API is still in beta form and needs to authenticate against each organization. There is no larger API that returns everything you're associated with. I might be able to whip something up, I just need some time to think it through.
  3. This is really cool. I was looking into making a better search tool for IMDB and was getting ready to use TMDB to shoe horn my way in or write a scraper. Only thing I can't figure out is what does 'ii' do that 'i' doesnt? And can I switch the keyword to 'imdb' (disabling native search too) instead of i?
  4. I'm currently instructing users to manually copy+paste the token and save it. I'll look into the AppleScript method. Thanks!
  5. I was planning to try and clean up some of my workflows where you can use OAuth for access. Mainly Slack, Uber and Trello. I found some libraries in python for OAuth I just wasn't sure if there was a good way to get the token passed back into Alfred.
  6. This is definitely possible via Applescript. You can tell it to activiate safari -> hotkey for URL bar -> cmd+C -> hotkey for private window -> cmd+paste or You can paste the url into the workflow and have it do -> hotkey for private window -> cmd+paste My preference would be to go for option #2 where you're giving Alfred the URL. Applescript is fine but it's also very much "in your face" versus behind the scenes so the more steps you can eliminate the better. Applescript is really easy to use and figure out, but if you need help doing this just ask!
  7. I know I've seen a few workflows pull it off but I'm just curious if anyone has any specific input on having Alfred handle OAuth? I would prefer to go that route over directing people to request API keys. I'm just not quite able to conceptualize how to have Alfred grab the auth token after approval. I tried looking through some workflows that incorporate it but I wasn't able to fully see how it was being pulled off.
  8. Attention: I am no longer actively working on this Workflow. I don't have the time to dedicate to it anymore and provide the kind of updates I'd like. If you want to fork and contribute back to it, please do so via GitHub. I appreciate all the support and kind words shown by users for making this. slackfred ========= Alfred workflow to interact, and perform various functions with the service Slack Alfred workflow to interact, and perform various functions with the service [slack](http://slack.com/). Now with multi-team support! I'm currently in the process of getting this updated to work with multiple organizations where possible, as well as adding some extra workflow options like private groups, stars and a few more things. Stay tuned! ## Getting started 1. Install slackfred by visiting the download page in Github or via the [Packal page](http://www.packal.org/workflow/slackfred) 2. Open alfred and type `slt`, then hold `cmd` (apple key) and press `enter`. This will open up the Slack API page. Then look for your team (make sure you're logged in) near the bottom. Next to your team name will be your token. 3. Launch alfred and re-run `slt` to enter your token. ##### Multi-team use instructions In order to use the workflow with multiple organizations you will need to enter all of your keys as comma seperated strings with **no** spaces. Example: `team-org-api-token-1,team-org-api-token-2` ## Currently Available Functionality * `slk`: Let's you switch easily between channels, groups and IMs. Thanks to buzali for getting this working with Slack's URL scheme. * `slt`: Set your API Token * Open alfred and type `slt`, then paste your token. If you don't have a token, then hold `cmd` to open the API page to get one (look for your team near the bottom of the page). * `slm`: Send messages to a channel * Open alfred and type `slm` to populate channels. Use your arrow keys to select a channel and hit TAB. Then you can enter your message and hit ENTER. * `slf`: Search files * Open alfred and type `slf` to search files. Selecting a file opens it in your browser * `slp`: Set your presence * Open alfred and type `slp active` or `slp away` * `slc`: View, leave and join channels or private groups * Open alfred and type `slc` to display a searchable list of channels. Selecting a channel with `alt` leaves and `ctrl` lets you join. Currently only `alt` is functional with groups. * `slclr`: Clear unread messages * This currently only marks Channels as read and not groups. Depending on the size of your organizations this can also take a few seconds to run. * `slim`: Enter a users name to search for most recent DM messages * `slr`: Search your starred items * Highlight a result and hitting enter opens the web client to that result * `sls`: Perform a query across all your channels in your organizations * Highlight a result and hitting enter opens the web client to that result * Depending on the size of your organization this can take a few seconds to run * `slz`: Snooze teams: * After finding a team hit TAB and enter the length of snooze in minutes * To turn off snooze to the above and enter 0 ## To-do * Create a smoother API key/token process * Improve speed and performance This workflow was created with the help of Dean Jackson's library.
  9. Just to verify: You figured out how to grab the contact info and pass it into the URL, but want it happen in the background instead of opening a tab/window?
  10. Decided to get creative tonight. Here is a very early version of Alfred interacting with Slack: http://d.pr/f/15qMv It currently does two things: 1. searches rooms and members, passes your selection to clipboard and runs the applescript above 2. search all uploaded files, passes your selection into the browser to view said file Let me know how you like it and if there is anything else you think might be good. Other stuff I'm planning to add: Leaving a channel Joining a channel Set presence Search messages Search everything (messages and files) And anything else I think I can pull off with the API
  11. Ha, yeah. Sorry, I was working off an existing Workflow I have using Applescript. By the way, I reached out to Slack to find out if they support URL Schemes for their desktop client. If they do I can probably throw something together for you.
  12. Totally. It depends if they support callback-urls/deep linking/urlscehemes. If you can do slack:// and have it trigger the app it will smooth things out.
  13. I think you can simplify this a bit: on alfred_script(q) tell application "Slack" to activate tell application "System Events" keystroke "k" using {command down} tell process "Slack" to keystroke (q as string) end tell end alfred_script
  14. As I said, based on the API documentations I'm not sure if the methods for interacting with rooms and people will join them or just simply display who they are. Additionally this likely interact with the website and may require some extra work to have it interact with the desktop application. Actually I'm fairly confident it will only interact with the website. So in the end you will still need to use Apple script to trigger interactions with the desktop client. Maybe someone can prove me wrong here but based on the API and the way other workflows work (like David's Rdio one) the situation you want wont be any fast or better than what you're using now.
  15. So are you looking to full replicate the way this works in Alfred? IE you launch Alfred, type Slack and it shows you all the users and rooms which you can filter? Looking throughe the API it appears you can list the people and groups but only join a group. Not sure if that means switching to the channel though. https://api.slack.com/methods
  16. Really appreciate. I'll probably be getting some time this weekend to dig into this. If I really hit a wall I'll post a gist.
  17. Thanks Dean. That makes a lot of sense, especially after using Packal Search. This is going to be a bit of a challenge for me but I'm looking forward to it.
  18. I'm trying to write a workflow for interacting with Trello. Based on the way the Trello API is (https://trello.com/docs/) I need to rely on IDs for the different sets of data. I was thinking of using key modifiers but I'm pretty sure that wont work. What I have in my head: tlo -> display all your boards -> select a board and the ID is passed to display the lists for that board-> selecting a list grabs the ID and displays the cards I may be trying to simplify this down a lot when in fact it needs to be more. I'm just drawing a blank on conceptualizing the workflow.
  19. Thanks! That makes sense and I'll dig into when I'm not at work. Appreciate the help and hard work you do. Edit: yep that did it. Thanks. I was working off of the stuff in usermanual so maybe that's where I was getting confused.
  20. I've used this library a bunch but this is the first time I've tried to cache data. I've looked through the documentation but I'm hitting a point where I can't troubleshoot further. boards = wf.cached_data('trello_boards', getBoards(api_key), max_age = 60) for board in boards: wf.add_item(title = board['name']) When I run the workflow I get: TypeError: 'list' object is not callable I doublechecked my function and it works so I'm at a bit of a loss.
  21. Fantastical by Daniel Pavey: I love love love Fantastical and the way it handles entries. Pinboard by jmjeong: Pinboard has replaced any form of bookmarking I use. I find relying on Pinboard to be far better than when I was trying with Evernote. Password generator: even though I use 1Password it's sometimes easier to just quickly generate a password this way Kill Process: I hate that I need and rely on this but crap happens. It's been super convienent over relying on activity monitor or parsing through ps -ef. Things: When I was still using Things (is v3 ever going to come?) I enjoyed using this. Pretty easy to get stuff into Things and their proper project place.
  22. Was I reading currently you have to apply for a key, then make an asset request? I know RT is owned by a larger company now, but that is just silly.
  23. Pushed up an update for this that now gives you much more control over your droplets. I removed all my settings, python modules, etc and was able to get this up and working with all the changes. So if anyone runs into problems please let me know.
  24. I'm planning to redo my github repo for my Alfred workflows, so I'll note to make sure these are included.
×
×
  • Create New...