Jump to content

Search the Community

Showing results for tags 'Python'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

  1. Markdown Notes help to manage Markdown files in a directory with powerful full text search (supports & and |), tag search or search for todos ( - [ ] or * [ ]) . It also allows to quickly create new notes based on custom templates. I started to write this to replace the ton of Note taking apps that I used a while ago. I spent a lot of time to get this to work and the setup is a bit complex but once you went thru the steps it can indeed replace your note taking app. The best MD Editor for this purpose is Typora but any other MD editor works as well. Download at Git as usual: https://github.com/Acidham/alfred-markdown-notes/releases/latest
  2. I probably spent far too much time not knowing what I was doing to produce this workflow but now that it will prettify a single obfuscated .json file, I could use some help with improvements: Support prettifying multiple selected files at a time (I've been able to do this with other languages, but haven't figured out how to work with an array of files in python in a Script Filter) Ignore any non-JSON files that might be passed in (currently if you run this against a TXT file, it'll replace the file contents with {query}! (whoops)) Improve the notifications based on whether a single or multiple files were processed I did take a look at @deanishe's Workflow Library or Python but it seemed like overkill for what I wanted to do. Also, I did find several other workflows that will prettify the clipboard's contents, but I specifically want to just handle files in Finder (for now). I found this technique which looked promising, but I kept getting syntax errors in the Script Filter when I would run it: import json import os # Read JSON data from file and pretty print it with open("{query}", "r") as jsonfile: # Convert JSON file to Python Types obj = json.load(jsonfile) # Pretty print JSON data pretty_json = json.dumps(obj, indent=4) print(pretty_json)
  3. I have a very basic python question that I was hoping to get a little help with that involves filtering out list items in a script filter. At the moment, the script filter works great except that it includes a few items I'd prefer not to see in Alfred's output. Is there any easy way to remove items whose titles can be found in another list? Admittedly, I normally do these sorts of things in AppleScript - which is pretty easy to do in this case - except that I’ve been trying to learn a little python, given all of the limitations with AppleScript (which @deanishe and @vitor have rightly reminded me of on numerous occasions, so hopefully this will make them proud 😃). For example, let’s say that I have the following list: titles_remove = {"Title A", "Title B", "Title C"} And, before outputting my results in Alfred, I’d like to remove all items whose titles can be found in titles_remove. At the moment, my script filter ends with the following line: print(json.dumps(result)) And, it’s JSON output follows the usual format where each item has a title, subtitle, uid, and arg. Now, if I modify that last line so that it’s output is: unfiltered_output = json.dumps(result) What should I do next to remove items whose titles can be found in the titles_remove list? I tried following several different python tutorials, but I kept receiving errors. I suspect that some of the methods weren't intended for dealing with strings. But I'm a complete newbie here. Thanks for any help you can lend! I really appreciate it. And, if anyone has any advice for python newbies that might want to do things with Alfred, I'd greatly appreciate any recommendations on potential resources to check out, etc. Thanks!!
  4. This is a workflow for easily downloading videos (and/or extracting audio) from various websites such as YouTube, Vimeo, DailyMotion and more... It uses youtube-dl as the core component. Main Features: Download video from URL. vd {video-url} Download and extract audio into an MP3 file. vd-audio {video-url} Display and download video metadata (json). vd-info {video-url} Update core component (youtube-dl). vd-update Display quick help in Large Type. vd-help Note: vd-update command currently only updates youtube-dl, not the workflow itself. Please see full details, updates (and source) of the project at GitHub. Download Video Downloader workflow. Here is a full visual list of what Video Downloader can do: And here is how the workflow nodes look like: Requirements: For the audio extraction (vd-audio) feature to work, you should install FFmpeg yourself manually (because of licensing issues). If you don't have it already; you can find details on how to install FFmpeg at the GitHub page. --- (While writing this, I found out about Vítor's workflow; which is also nice and uses youtube-dl. Well, I'm releasing this anyway for it's extra features like audio conversion, metadata info, etc..) Pls. drop a note if you like it... Thanks.
  5. Hey all! This is a newbie question, thanks in advanced for you patience. I have written a script that restructures a specific URL on python. It works well in Pycharm. I am wondering how I can use alfred to run this script. Happy to do the work of reading and learning, but after hours of googling I have come up mostly empty handed. Code below incase it's relevant. import pyperclip text = pyperclip.paste() link = text pt_1, Pt_2 = link.split("#") notion, erase, delete = ([pt_1[i:i+22] for i in range(0, len(pt_1), 22)]) confirm = ('{}{}'.format(notion, Pt_2)) pyperclip.copy(confirm)
  6. Shorten URL (v1.1) - download here Github Page: https://github.com/hzlzh/Alfred-Workflows This workflow support URL shortener like below. You can use Hotkey to trigger without open Alfred input window. goo.gl/ bit.ly/ t.cn/ j.mp/ is.gd/ v.gd/ If you want more URL shortener services added, please let me know, . How-To: Choose some long links (e.g Command + A), then press `Command + Shift +L`, choose goo.gl and you will get the short link in your clipboard with notification center triggered. Tips: How to use this workflow without copy/paste? Just use trigger HotKey, check out this wiki issue here: https://github.com/h...kflows/issues/1 Screenshot:
  7. Hi, [Objective] I am trying to build a workflow which gets a DOI link [e.g. https://doi.org/10.1287/orsc.3.3.398] and sets my clipboard to some text from a pulled JSON file. In this case (Orlikowski, 1992). However, I am having a hard time importing the query from Alfred in to the file, and getting it back. I have written the python script, lack the means to use the file. I have made the beginning of the workflow, using regex to focus on the link I need (e.g. 10.1287/orsc.3.3.398) with the regex key - (\/\d{2}.\d{4}\/\w.*), def main(): urlData = "https://api.crossref.org/works/" # the query should be inserted on line 44 urlData += "10.1287/orsc.3.3.398" # Open the URL and read the data webUrl = urllib.request.urlopen(urlData) print ("result code: " + str(webUrl.getcode())) if (webUrl.getcode() == 200): data = webUrl.read() # print out our customized results, but should set this to clipboard print(printResults(data)) else: print ("Received an error from server, cannot retrieve results " + str(webUrl.getcode()))
  8. There is a bug in my (unofficial) Alfred-Workflow library that causes very many workflows using it to hang quite dramatically on Sierra. If you are affected (i.e. you see Alfred's CPU usage spike to 100%), Activity Monitor will show two Python processes like this (choose View > All Processes, Hierarchically), with the bottom one at ~99% CPU (this screenshot is actually of a non-misbehaving workflow): Download and run this workflow, which will update any old versions of Alfred-Workflow in your installed workflows. That should get your workflows working again until the workflow developers can push official fixes.
  9. Description Equivalent of the mobile versions of Google Authenticator: https://itunes.apple.com/en/app/google-authenticator/id388497605?mt=8. I personally use it on Gmail, Amazon AWS, Github, Evernote and Dropbox A bigger list is available on Wikipedia: http://en.wikipedia.org/wiki/Two-step_verification There is also a Pam module project on Github: https://github.com/nlm/pam-google-authenticator Non-exhaustive list of links for "secret" installation Google: http://www.google.com/landing/2step/ Dropbox: https://www.dropbox.com/help/363/en Evernote: http://blog.evernote.com/blog/2013/05/30/evernotes-three-new-security-features/ Github: https://github.com/blog/1614-two-factor-authentication Amazon AWS: http://aws.amazon.com/iam/details/mfa/ Facebook: https://www.facebook.com/settings?tab=security Dependencies Python>=2.7 System Modifications Create a ~/.gauth file with your secrets, ie: [google - bob@gmail.com] secret = xxxxxxxxxxxxxxxxxx [evernote - robert] secret = yyyyyyyyyyyyyyyyyy It's also possible to add credentials with "gauth add [account] [secret]" from Alfred Source Code: Github https://github.com/moul/alfred-workflow-gauth Download Links Packal: http://www.packal.org/workflow/gauth-google-authenticator Direct link: https://github.com/packal/repository/raw/master/com.alfredapp.moul.gauth/google_authenticator.alfredworkflow Screenshots Acknowledgments Original alarm clock iconAlex Auda Samora from The Noun Project Licensed under Creative Commons Attribution Status & signs iconsHereldar Terkenya Licensed under a Creative Commons Attribution-Share Alike 3.0 License Original source codeManfred Touron Serial contributorGilberto Olimpio License MIT
  10. IMPORTANT NOTE ABOUT HANGING PROCESSES ON SIERRA (2017-04-03) Versions of Alfred-Workflow older than 1.25 cannot launch background processes properly on Sierra. In fact, they regularly hang quite dramatically and consume 100% CPU Users (in particular) affected by this bug should install and run this workflow, which can find and fix any workflows with broken versions of Alfred-Workflow. The workflow library for Python GitHub | Documentation A feature-rich library for developing Alfred workflows in Python The library is simple to install, has no external dependencies, is very well-documented and maintained, and boasts an eye-wateringly high feature-to-size ratio at under 400 KB. It is the only Python library that is always up-to-date with Alfred's features. Main features Supports all Alfred features from 2.0 to 3.6. Catches, logs and notifies users (and developers) of errors in Workflows. No more confusing, silent failure. Super-simple, yet powerful data caching (e.g. from a web service) and storage, including session-scoped data. Easy-to-use Workflow settings API. Supports Alfred's AppleScript API, including saving settings to info.plist and calling External Triggers. Keychain access for secure storage (and cross-machine syncing) of sensitive data, like passwords and API keys. Tunable and understandable Alfred-like fuzzy search (e.g. got matches Game of Thrones as well as Baby Got Back. Or not: that's up to you.) Extremely lightweight, but full-featured, HTTP library with Requests-like interface, but just 12 KB instead of > 2 MB. Convenient access to standard macOS icons, for high-quality, familiar icons without adding size to the library. Also available via proper English. Pre-configured, built-in logging to enable simpler Workflow debugging. Painlessly run (update) scripts in the background without blocking your workflow, so you can still show "old" results while fetching new ones. API for running AppleScript/JXA scripts. Simple support for 3rd-party libraries your Workflow relies on. "Magic" arguments to make developing/debugging Workflows so much easier, especially when helping less technically-inclined users. With "magic" arguments, you and your Workflow's users can open the Workflow's log file in Console.app, its cache and data directories in Finder, and its root directory in Finder or Terminal from the comfort of Alfred's query box. You can also delete the cache/data/settings if something is corrupted. Your workflow can update itself via GitHub releases. Smart handling of non-ASCII. Query sale will match result salé, but query salé will not match result sale. Functions to support migrating settings/data from older versions of your workflow. Alfred 3-only features Workflow variables Advanced modifiers Alfred 3-only updates Re-run Script Filters And as you can see from the above links, there is extensive documentation, including a two-part tutorial on building a Workflow from scratch. Examples Here are a few examples of how you can do some pretty cools stuff in just a few lines of code. A simple Workflow I made to search Packal in ~90 lines of code. A simple Workflow to search your recent Pinboard posts in ~50 lines of code. A polished, user-friendly, wicked-fast Workflow to search your recent Pinboard posts in ~200 lines of code. Remember, each of these Workflows also has—for free—full error-catching and -logging support, and the ability to open its log file (which contains all errors) via Alfred's query box. No need to ask users to grub around in ~/Library or flounder in Terminal here. This is not the Workflow library 2014 deserves, but it's the one it needs Feedback If you have any bug reports/feature requests, add them either here or on GitHub. More info The documentation is the definitive source of information on the Alfred-Workflow library. The User Guide and Tutorial provide fairly extensive information both on how to use Alfred-Workflow and write Workflows in general (if you're new to this lark).
  11. This workflow lets you control your Home Assistant from Alfred. You will be able to control you lights, get sensor information, trigger automations and look for your devices in device tracker. And more to come.. Setup _haurl - Set the URL to the home assistant. _hapassword - set the API password for Home Assistant Commands to interact with home assistant To triggar an automation: haa To control lights: hal To control your alarm: haal To look at a Sensor: has To look at device tracker had You will find the workflow here : https://github.com/Skakiz/Alfred-Home-assistant-workflow Lights: Automations: This is my first python coding, so no glitter code. Thanks! //Andreas
  12. Open man pages with name and section filtering. The 'man' keyword exploits the x-man-page: protocol handler, so will default to opening in Terminal.app but can easily be switched to iTerm2.app. 'hman' opens pages in your default browser, and 'pman' opens PDFs in the default PDF reader. Download / Source Usage man open(1) # open a specific page pman style # open a PDF of the style(9) manpage man open # search all sections for pages matching 'open*' man *open # search all sections for pages matching '*open*' man 2 open # search section 2 for pages with 'open' in the name Enjoy.
  13. Hello,everybody! I want to implement a very simple function by workflow. First, type the keyword as a trigger and a number (for example decimal 23.45678) as a query. Then, convert it to 23.46(keep two decimal places). Finally, copy the consequence to the clipboard. It seems a really easy job. But I don’t know how the query or arguments input and output through python. After searching answers for several hours, I can’t find similar demos from internet. It makes me a little depressed. Could anybody do me a favor? Thanks so much!
  14. This one has been at the top of my Alfred wishlist since I downloaded my first Alfred v0.whatever beta: a workflow to open an ssh session (using the default ssh: protocol handler) with "smart" hostname autocompletion (based on ~/.ssh/config, ~/.ssh/known_hosts, /etc/hosts, Bonjour or any file containing the names of hosts you need to connect to). Comments and suggestions welcome. Download v1.3 for Alfred 2 Download v2.0 for Alfred 3 Source and Issue Tracker on github Robin Updates 2013-03-14 00:00, v0.4: rudimentary fuzzy matching, to pull entries from /etc/hosts as well as ~/.ssh/known_hosts, and to deal with usernames properly. 2013-03-14 09:00, v0.5: smart host matching. 2013-03-14 22:45, v0.6: ~/.ssh/config and Bonjour discovery (including full BTMM support), and improved error handling. 2013-03-14 23:00, v0.61: explicitly removed 'broadcasthost' from the list of possible matches. 2013-03-15 00:30, v0.7: match '.' as '.' 2013-03-16 10:45, v0.8: refactored code and add tab autocompletion. 2013-03-16 13:30, v0.9: oops - the last update broke the workflow if you didn't have pybonjour installed; fixed. Continued refactoring: now using nikipore's alfred-python module. 2013-03-16 14:15, v0.10: further refactoring to break core functionality out into a dedicated module (enabling module compilation). Combined with caching of file parsing results this should deliver significantly enhanced performance (not that it was slow before). 2013-03-16 23:00, v1.0: complete refactoring and move release to github. New feature: display the source(s) of each suggested completion. This ought to be the last update for a while. 2013-03-16 08:40, v1.1: fixed breakage when either of ~/.ssh/config or ~/.ssh/known_hosts didn't exist. 2016-06-02 21:00, v1.3: fixed path to Alfred cache (thanks @okapi!). 2016-10-07 12:30, v2.0: The Alfred 3 Release (including removal of built-in sources and addition of custom sources)
  15. What is the easiest way to access several clipboards items {clipboard:0..n}, then pass to python code that transforms these (uses a template) and pastes the result to an app, then hit tab and paste even more text to an active app? Any workflow I can look at to copy? I am stuck:
  16. To make a long story short, I updated a workflow. It has a long action that is done by an Alfred Script object in AppleScript. In certain cases, I want to do some of the work via a python script rather than in AppleScript. To do this I added the following which checks a variable already set and if so tries to run a python script I put in the workflow folder. (The argument passed is encapsulated in quotes) --check if online and if so, use Python. if contents of online is "online" then --run script to put passage onto the clipboard do shell script "python ./get_verse.py \"" + passageRef + "\"" --paste the passage into the current app keystroke "v" using command down else The réponse I'm getting back in Alfred debugging is: [2019-01-16 15:18:30][ERROR: action.script] /Users/samuel/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/27C48708-2D1A-4008-BCBF-CCABCD6247DC:801:811: execution error: Can’t make "python ./get_verse.py \"" into type number. (-1700) This tells me it's not executing the python script. I'm sure there's something simple here I'm missing but cannot figure out what it is.
  17. I want make a quick search for phpBB forums websites one of them is www.cracked.to when I search on it, it generate a new SID for each search result so the simple of putting {query} isnt the option, I was wondering if I can pass it through python: I tried this on windows terminal, its working, but I am not sure pass how to pass it on web browser through Alfred. Here is the script: import requests import sys query = sys.argv[1] payload = {'action': 'do_search', 'keywords' : query, 'postthread' :'2', 'matchusername' : '1', 'forums[]': 'all', 'findthreadst':'1', 'numreplies':'', 'postdate':'0', 'pddir':'1', 'threadprefix[]': 'any', 'sortby':'lastpost', 'sortordr':'desc', 'showresults':'threads', 'submit':'Search'} if len(query) > 0: r = requests.post('https://cracked.to/search.php', data=payload) print(r.cookies) print(r.url) Here is the workflow: https://d.pr/f/vEVw9K Any ideas?
  18. This workflow is dead. Please check out its spiritual replacement ZotHero instead. ZotQuery Search Your Zotero Data From the Comfort of Your Keyboard. Please update (via Packal) to Version 8.5, for optimal performance. ZotQuery is an Alfred workflow that grants the user access to the data stored in their Zotero application. The Python scripts in this repo form all of the necessary components for this workflow. To download, visit the page on Packal, the workflow aggregator for Alfred, where you will be able to update to the newest versions. For a full README, filled with images (the forums limit you), visit my blog at: http://hackademic.postach.io/zotquery-an-alfred-workflow-for-zotero Unfortunately, there are too many features and too many screenshots for this forum to handle. But the page on my blog has extensive documentation. I've just pushed another update to Packal (v. 8.0.3). Please update if you have an older version. In version 6.2, "odt-scannable-cites" is a new option in the z:set export options. If you export a full Citation or a short Reference, you will get a base form Scannable Cite for that item. Version 6.0 moves the backbone of the workflow from alp to @deanishe's Workflow library, which among other things, allows for a new debugging keyword. Now, if user's wish to report an error, they can use z:bug to automatically open ZotQuery's log file, which you should include alongside your error report in this thread.. In addition, version 6.0 adds new, shorter script filter keywords. I've kept all of the old, longer keywords as well, so everything is backwards compatible, but now, users can simply use: z = zot zt = zot:t za = zot:a znc = zot:c znt = zot:tag zn = zot:n zat = z:att ztg = z:tag zc = z:col Unfortunately, version 6.0 also removes version 5.0's ability to add a PDF attachment to an item in your Zotero library. However, this and other PDF management features are under development, and I will push out an update that brings this back (with more) sooner rather than later. All of this comes in addition to the big additions from 4.0: ZotQuery now can export in both Markdown and Rich Text. This means all academics on the Mac who use Zotero can take advantage of ZotQuery's quick access to their citation data. Export individual references or citations in rich text, or export full bibliographies from Collections or Tags in rich text. Exporting preferences to the configurator. Now you can select out of 5 possible CSL styles for export. Instead of the default Chicago (author-date), you can now also choose APA, MLA, BibTeX, or Zotero's own RTF-Scan cite key format. In addition, you will also then choose which format to export in: Markdown or Rich Text. At any point, you can also change these settings using the z:settings command. Ability to search only items with attachments. This works effectively like an attachments search, since you only need to press return (not shift+return as with the other queries) in order to open the attachment. The ability now to export in BibTeX or Zotero's RTF-Scan format makes ZotQuery is utility for LaTeX writers as well as scholars who write in standard word processors. You could also easily move from BibTeX or RTF-Scan and take advantage of ZotQuery's full text exporting in Markdown or Rich Text. Either way, the workflow should be a helpful companion regardless of your writing workflow. These features are in addition to the standard features of ZotQuery: Search your Zotero library with keyword Search by author last name, title, in collection, or in tag Open, export short reference, export full citation, or append citation to temporary bibliography[/[/i]] Export full bibliography from collection or tag in alphabetical order Create and keep up-to-date a JSON cache of your Zotero data (helpful for other scripting possibilities) As a side-note, can people let me know what version of OS X you have ZotQuery working on? And what your Zotero set-up is? (Standalone? Firefox? Both?). I want to upgrade my README with testing conditions. Any info is helpful. Thank you. I hope you enjoy it. -stephen
  19. So I recently installed a community workspace for Alfred and I see it's passing a query to a Python script - which brings me to my question. Where can I see the source of this script?
  20. Philips Hue Controller for Alfred Quickly and easily control Philips Hue lights with Alfred. Installation Download the workflow The first time you run the workflow it will ask you to press the button on top of the Hue bridge then action the item to authorize the workflow to control your Hue lights. The workflow automatically attempts to find the bridge on your local network. You can also manually specify the bridge's IP address. For example, if your bridge's IP is 192.168.1.126: hue 192.168.1.126 Read more about features at the project's Github page.
  21. This workflow will take the focused/front Finder window and create a temporary Python Server at that location, using `python -m SimpleHTTPServer`. Function will also open the default web server URL (http://0.0.0.0:8000) in the default browser when the python server has started. This is an extremely handy way to quickly test code in a server environment, especially when working with cross-domain functionality that will not work from localhost/local file server. Basically allowing you to create an ad-hoc/on-demand web server at any Finder location on your mac. Borrows some of the Terminal Finder functionality from Chris Yip's "Terminal Here" workflow: http://chrisyip.im/ Download: http://cloud.joshuarhoades.com/3O0c1h3P250l
  22. Hi, So I'm a newbie, but I've managed to install Google assistant using terminal and can access it there. I want to use this alfred workflow http://www.packal.org/workflow/google-assistant to launch Google Assistant in the background but can't get the workflow to talk to python. Currently I have to type " source env/bin/activate and then: python -m googlesamples.assistant.grpc.pushtotalk The way the workflow is originally does not correspond to the steps I take to launch Google Assistant using Terminal. Can someone help me modify the workflow script to allow me to use Alfred to trigger Google Assistant? Many Thanks, Stephan
  23. Hi guys. I tries to make a workflow which launches my own python script. Script accepts exact 2 arguments. What is the best way to do that?
  24. Here is a workflow for bulk renaming files. You select some files either in Alfred using the File Navigator or the File Buffer and use the File Action called "Rename with BulkRename", or select the files in Finder and use the hotkey to trigger the workflow for the selected files. Once triggered, Alfred will display a preview option and a bunch of preset actions that you can select. The preview option will display the modifications that will be made for each preset action listed. Preview Here are a couple of snapshot portions of what you see when pressing the Shift key: Issues are highlighted so that you know if running a preset will work or not. Even if you run that preset, nothing will happen. Preset Actions There are 6 actions included as a sample, but you can easily create your own actions using the .list keyword. To create a new preset, type in .list <new name>. Delete a preset using Cmd+Enter Each preset is nothing but a collection of simple steps that help make the preset action possible. For e.g. when you select the Append Sequence Number preset, you will be shown the preset editor: What the above tell is that the Append Sequence Number preset is a collection of two steps: add text '_seq' at end add number from 0, at end There are added to the preset using any of the steps [+] listed. You can add any number of steps to a preset, even the same ones over and over. You can delete an added step using Cmd+Enter When you add a new step to a preset, or edit an existing step by selecting it, you will be shown the Step Node Editor as above. The above is the example for the "Number Sequence" step, and for this step you can control what the starting number is, where the number should be added, and the format (leading zeros to be added). Items with a arrow -> are variables that you can change by pressing the Tab key. To add the step, just select the first option, and that step will be added to the Preset that you were viewing before. Steps Steps are the building blocks of each preset, and currently BulkRename has the following: Find and replace: find text and replace with another, supports regex and plaintext, case sensitive and insensitive Add text: add some text at the beginning or end of the filename Add timestamp: add a timestamp at the beginning or end of the filename. Timestamp is one of current time, file created or modified time. YYYY,YY,MM,DD,hh,mm,ss can appear in the format string Convert case: switch the case of the filename to lower, upper, or title Strip text: remove x characters from the filename either at the start of end Number sequence: append a running number sequence, starting from a value that you can specify MP3 Tagger (beta): Extract MP3 tags from MP3 files Regex group extractor: Regex group pattern extractor Change Extension: Allows you to change the extension of a file Keywords The main keyword is .rename (but you would not have to type that in if you use the File Action or the Hotkey) The second one to manage all your presets is .list. .preset and .node are keywords used by the workflow directly, and there is usually no need for you to type those in directly. Download Download from here Notes This works with Python 2.7.2 last I checked Have a look at the included sample presets using the .list keyword to get a hang of how presets are made, and then create your custom ones
  25. I've completed a python script to query the puppet forge api. http://projects.puppetlabs.com/projects/module-site/wiki/Server-api When I call the python script from the command line, it successfully returns all puppet modules desired $ python myscript.py foo When I place the same python script into an alfred workflow, and set it to require 1 argument, alfred 'gives up' the search before I've fully entered what I am looking for. Anyone have any ideas why Alfred doesn't wait for me to enter the entire string before searching? Here is a video showing the problem *Update* My code is now on github https://github.com/spuder/alfred-puppet-forge It turns out that if I wait long enough, the script does eventually return. The problem is that alfred is calling the script every time a new letter is entered. Searching the api gets faster each letter that is entered For example: a = 1000 results ab = 100 results abc = 3 results abcd = 1 result So In practice, I have to wait for the results of a, ab, abc, before I can get the results of abcd. This is a 10 to 30 second delay for the data I am querying, which is far too long. How can I make alfred wait until I have finished entering abcd before executing?
×
×
  • Create New...