Jump to content

jeffsui

Member
  • Posts

    93
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by jeffsui

  1. I wrote up a medium article about developing the Alfred Today workflow - for those who are interested: https://medium.com/@Jeef/alfred-today-my-experience-writing-a-plugin-80cbd0fea9c1#.ntm6o81yr
  2. I actually just wrote a medium article that discuses external triggers. My use case was having a task that displays cache results. Then it runs a background process and if that detects an update is needed to the data, it will use a series of external triggers to cause the alfred to hide and then reload the search results. You can read here if you like: https://medium.com/@Jeef/alfred-today-my-experience-writing-a-plugin-80cbd0fea9c1#.ynbhwyur1
  3. I was going to request a way to auto-refresh workflow results in alfred but it looks like a combo of the "hide Alfred" command and the external triggers has allowed me to do EXACTLY what i want. Thanks for the update!
  4. So I ran your script and it seemed to still be picking up my .git directory which is odd. I added dirnames[:] = [d for d in dirnames if not d in ['.git','.idea']] right after this block of code # build workflow command = [u'zip'] if not verbose: command.append(u'-q') command.append(zippath) for root, dirnames, filenames in os.walk(u'.'): and it worked for me. Not sure if this is helpful feedback - but
  5. I've created a handful for workflows that we use at my office and I would love to have an easy way to batch export and update the metadata so that i can share them with people. Right now when i make a change export the workflow to disk and email it to people. It would be great if there was some way to automate this or script this out. so i could just run alfred -package workflow_name outputFile and then upload the workflows to an internal server or something like that. It this possible or just wishful thinking? Thanks
  6. You can also just copy the binary into the workflow directory. And then call with no path.
  7. Um -> isn't force quit built into power pack? You can just type forcequit and it pops up a list of apps.
  8. I'm having a difficulty with using Alfred to filter script results I have a python script that queries an internal wiki #!/usr/bin/env python from __future__ import print_function import sys from workflow.workflow3 import Workflow3 from workflow import web QUERY_URL = 'http://MYCOMPANY.ORG/mediawiki/api.php?action=opensearch&format=json&search={}&namespace=0&limit=50&suggest=' PAGE_URL = 'https://MYCOMPANY.ORG/mediawiki/index.php?search={}&title=Special%3ASearch' def main(wf): Workflow3().logger.info(wf.args[0]) Workflow3().logger.info("HI") query = str(wf.args[0]).replace(' ', '%20') results = web.get(QUERY_URL.format(query)).json() for keyword in results[1]: url = PAGE_URL.format(keyword.replace(' ', '+')) wf.add_item(keyword, '', arg=url, copytext=url, icon='logo.png', valid=True) wf.send_feedback() if __name__ == '__main__': wf = Workflow3() sys.exit(wf.run(main)) I have this in a script filter and if I run with bash and use the command: python wiki.py $1 Everything works fine. If i select "Alfred filter results" I get the following error Is there something different in the way the script is being called if i have the Alfred filter results button pressed? I'm assuming the query parameter is perhaps passed differently? Any insight?
  9. Intersting - I wrote a search for BitbucketServer / Stash
  10. This workflow will query both or either Exchange Office 365 or Google Calendar to pull down a daily list of events. They will be organized by time and - if configured - it will extract online meeting information from either Skype or Hangouts and allow you to jump right into the meeting Usage You can use the following commands Available Commands: Today (shows the today list) Tomorrow (shows tomorrows list of events) tc Loads configuration options tcrest Restes data to default Download the Latest Release * Github Link (Documentation & Source) * Packal Link Version History: - 2.0.1 - Fixed a bug in exchange credential loading - 2.0.2 - Added Dateutil into the included libs - 2.0.3 - Fixed event sort order - 2.0.4 - Google calendar will now prompt for initial authorization (in theory) - 3.0 - Background fetching and significant speed up on UI - 3.1 - Changed the sort order so past events show up at the bottom of the screen now - 3.8 - Huge refactor of internal code base. Better debug logging and background processing - 3.8.1 - Minor bug fix where tomorrow was returning today and today tomorrow - 3.8.2 - Fixed a bug in the internal cache - 3.9.1 - New Fancy Help, and remove CA_CERTS requirement which was causing auth issues.  Manual Auth support in documentation -3.9.2 - SSL Toggle ability - by default SSL is enabled - if you have troubles you can turn it off - 3.9.3 - Minor patch in SSL Stuff - 3.9.7 - Major bug fix in google authentication and SLL toggle support. - 4.0 - Multi Calendar mode for google - 4.1.0 - Updated quick look templates and enhanced protection for out of sync settings files - 4.3.1 - Fix for auto update mechansim - 5.0.1 - Ability to disable All Day Events (Outlook Only - google coming soon!) - 5.0.2 - All Day - Outlook and Google (BE HIDDEN) - SOON HAS COME! - 5.0.3 - Google Calendar Auth Fix - 5.0.5 - Client Secret errors resolved
  11. I have written a workflow that will query an exchange server and pull out a "today" list of appointments meeting etc and its pretty cool - except I built it for our internal exchange system with lots of nice hardcoded things. I'd like to open this workflow up to the outside world - and as such - I need to store a users password and username. I can do this in the plist but I was wondering if there is a way to pull exchange credentials out of the keychain so that I don't need to go through the configuration step. Any ideas?
  12. I want to make a workflow that queries a continuous integration server and i wanted to have an animated gif icon for the tasks that are currently in progress
  13. The workflow is posted here (or rather a similar one). https://github.com/jeeftor/workflow py1 will call the internal script py2 wil link to /tmp/pyTest.sh (so you might need to move the script to the temp dir) In theory the subtitle of the result will show the query string
  14. Ok so here is my script: I tried without the #!/usr/local/bin/python But i get "the script may not exist or doesn't have execute permission error - even though it has permission 777 And when I try to run `pb1 test` I'm just having ZERO luck getting my arguments to pass in.
  15. i would also like this because i have my own custom contacts i'm working with
  16. I'm a little confused as to how an external script is supposed to get its arguments My script looks like this: #!/usr/local/bin/python import urllib2,json,os,sys import xml.etree.ElementTree as ET query = sys.argv[1] And i'm getting no arguments. When i run the same code as an internal python script i have ZERO issues. Is there something i'm missing on how you are supposed to pass arguments into an external script?
×
×
  • Create New...