Jump to content

deanishe

Member
  • Posts

    8,759
  • Joined

  • Last visited

  • Days Won

    522

Reputation Activity

  1. Like
    deanishe got a reaction from bk161124 in List, filter and activate network locations from within Alfred   
    View and change your network location from Alfred.
     


    Installation

    Download the workflow from Packal or GitHub.

    Usage
    netloc [<query>] — Show list of network locations filtered by <query> if one is specified ↩ — Activate selected network location ⌘+↩ — Open Network Preferences ​Note: You will probably be asked to enter your password to change the network location.
    Licence

    This workflow is released under the MIT Licence.
  2. Like
    deanishe got a reaction from Tyler Eich in LaunchBar 6 improvements I'd like to see in Alfred   
    This one so much.
    Multi-level workflows are so common, and the current "hacks" of using special delimiters or calling back into Alfred via AppleScript look ugly and amateurish and complicate the coding of workflows significantly.
    Proper support for multiple levels (so you can drill-down and back out like on iOS apps) would be a massive help.
  3. Like
    deanishe reacted to Vero in Mail.app search by author, subject or content [For macOS Mojave & earlier]   
    Thought I should share this workflow to search Mail.app
     
    Use the following keywords to search:
    emfrom to search the sender's name and email address em for a general subject + content search emsubj to search specifically for a subject line  
    You can download it here. Enjoy!
     
    This version is suitable for both Alfred 3 and Alfred 4. 
     
    Compatible with macOS versions up to Mojave.  Unfortunately, due to some changes made by Apple in macOS Catalina, it's no longer possible for third-party apps to access your Mail data. This may change in the future, but currently, using this workflow in Catalina or Big Sur will not return any results.
  4. Like
    deanishe got a reaction from alexcory in Relative + Absolute Path Finder Workflow   
    Sublime's a funny old beast, not being a native app. It does some odd things on Mac sometimes.
    I'd go with writing a Sublime plugin to call Alfred instead if that's your editor of choice.
    Real men use MacVim of course
  5. Like
    deanishe got a reaction from alexcory in Relative + Absolute Path Finder Workflow   
    Your controller.php isn't working because you're including an AppleScript. include is only for PHP code. You don't need to include the AppleScript, just run it and grab the output.
    Which IDE/editor are you using? Unless it's a native Cocoa editor, you aren't going to have much joy getting the filepath with AppleScript. It might be a better idea to write a plugin for the editor that calls Alfred with the filepath rather than the other way around (Dash works this way, for example).
    You can determine the project root easily enough by climbing up the FS tree till you find .git or htdocs. If you take the editor plugin route, it may be possible to ask the editor for the project root, too, and pass that to Alfred as well.
    Here's a PHP function to get the relative path from one file to another.
  6. Like
    deanishe got a reaction from Carlos-Sz in Allow workflows to get results from other workflows   
    A feature I think could be an enormous boon to Alfred's functionality without massively expanding its scope would be the ability for workflows to call other workflows via Alfred's AppleScript API, but with the results returned to the workflow, not Alfred.
    With a single addition to Alfred's AppleScript dictionary, say, tell Alfred to search "query" and return results (or however these things work), the (XML/arg) results from one workflow/Script Filter could be returned to another.
    This would allow workflow devs to chain Script Filters together—something that could massively simplify workflow development—without requiring a significant overhaul of Alfred's API/workflow model.
    Currently, workflow authors have to jump through a lot of hoops to implement multi-stage workflows, usually with the undesirable "flash" of a disappearing and reappearing Alfred window.
    For example, my FuzzyFolders workflow has to use multiple keywords and delimiters to coax Alfred into performing a multi-step action. It would be much cleaner for the user and much easier for me (the developer) if I could tell Alfred to perform an action but return the result(s) right back to my script instead of passing it/them off to another action.
    Many workflow authors resort to AppleScript dialogs and tools like Pashua/cocoaDialog to solve this problem, which (1) kind of wrecks the Alfred aesthetic/workflow and (2) results in a dozen copies of the same helper app wasting space in users' Dropboxes.
  7. Like
    deanishe got a reaction from enigma2k in Making a custom search for GolfWRX forum   
    You have the right URL (http://www.herold.at/servlet/at.herold.sp.servlet.SPWPSearchServlet), but because there's only one "argument", you have to do:
    http://www.herold.at/servlet/at.herold.sp.servlet.SPWPSearchServlet?searchterm={query}
    Note the ?.
  8. Like
    deanishe got a reaction from enigma2k in Making a custom search for GolfWRX forum   
    You can right-click on the search field and choose Safari's or Chrome's or Firefox's "Inspect Element" to look at the source code and see what the search query parameter is called. It's not super straightforward, however, so I did it for you.
     
    If you create a custom search in Alfred with this URL:
     
    http://www.golfwrx.com/forums/index.php?app=core&module=search&do=search&fromMainBar=1&search_term={query}
     
    it should do what you want. The {query} at the end is what Alfred inserts the search query into. search_term is the name of the query form input field (i.e. what the website expects the query to be called).
     
  9. Like
    deanishe got a reaction from Carlos-Sz in alfred-pinboard version2.3 (alfred3 support)   
    Do external triggers also get wiped in updates? That's bad
    I say, surprisingly enough, go with my background fork method. Better yet, use my Python workflow library. It will make everything better, including your sex life and male-pattern baldness*
    * Not actually true. I'm still single and bald
  10. Like
    deanishe reacted to jmjeong in alfred-pinboard version2.3 (alfred3 support)   
    - GitHub Page : https://github.com/jmjeong/alfred-extension/tree/master/alfred-pinboard
    - Workflow Download : https://raw.githubusercontent.com/jmjeong/alfred-extension/master/alfred-pinboard/pinboard.alfredworkflow
     
     
    v2.3 (2016-05-20)
    Update Settings for Alfred v3   v2.27
    Fix a bug in debug logging v2.25
    change Reload threshold time to 1 hour from 12 hours Arrange alfred layout  
    v2.24
    pblog records copy command guard code for invalid bookmark data  
    v2.22
    Launch history command (pblog) Sort option : last accessed time (^l) '!' is used to sort key too  
    V2.1 Changelog
     
      - multiple tag search : specify tag group for searching (#)   - display last modified time of local cached bookmarks   - display host name only in main list   - display tag information in main list too   - update the number of entries in the history list after searching   - display untagged bookmarks in tag list   - support sort option : title ascending(`^a`), title descending(`^z`), time ascending(`^d`), time descending(default)    
     
    Yet another alfred-pinboard workflow. It provides INSTANT pinboard search and the following function.
    search pinboard (pba) - supports various search condition such as or(|), and( ), and not(-) search tag (pbtag) search pinboard memo (pbmemo) show starred bookmark (pbs) browse and search history (pbhis)
    goto or delete the searched bookmark
    copy url of the searched bookmark send url to pocket mark or unmark the favorite bookmark
    InstallationDownload and Install alfred-pinboard Workflow You need to set short-key manually pbauth username:TOKEN <- set access token Get it from https://pinboard.in/settings/password pbreload - loads latest bookmarks and memo from pinboard.in search with pba, pbtag, pbmemo command (optional) pbauthpocketneeded only if you want to send URL to pocket (optional) install cron job : for faster searching without pbreloaddownload it from pinboard-download.py chmod a+x pinboard-download.py register script in crontab using crontab -e
    */15 * * * * /path/to/pinboard-download.py > /dev/null 2>&1
    Command pba query : search query from description and link and tags pbnote query : search query from pinboard notes pbu query : search query from description(title) in unread list pbl query : search query from link pbs query : search query from starred bookmarks pbtag query : search tag list. You can autocomplete it by pressing ‘tab’
    pbhis : show search history
    pbreload : loads latest bookmarks from pinboard.in
    pbauth username:token : Set pinboard authentication token (optional)
    pbauthpocket : Pocket authentication (optional) Search Condition- before search word stands for not ex) -program  stands for and query ex) python alfred | stands for or query ex) python|alfred and query is evaluated first, than or query is evaluated KeysYou need to set it manually because of alfred restriction
    ctl-shift-cmd-p : launch pba ctl-shift-cmd-c : launch pbtag ctl-shift-cmd-n : launch pbnote ctl-shift-cmd-s : launch pbs ctl-shift-cmd-h : launch pbhis Action enter to open the selected url in the browser tab to expand in pbtag command Hold cmd while selecting a bookmark to copy it’s url to clipboard Hold alt while selecting to delete a bookmark from your pinboard Hold ctrl while selecting a bookmark to mark or unmark it Hold shift while selecting to send URL to pocket. You need to set auth_token using
    pbauthpocket  
    help

    Search
    Tag Browse
    Tag Search
    Starred Bookmark
    Search History
  11. Like
    deanishe got a reaction from dkoder in Fuzzy Folders   
    Fuzzy search across folder subtrees.
     
    Update 10/09/2016:
    Added Alfred 3 support and removed Alfred 2 support. Added ability to self-update.  
    Update 10/04/2014:
    Added support for glob-style excludes. Unfortunately, these have to be added manually to the settings file at the moment. Update 05/04/2014:
    Now supports searching files as well as/instead of folders You can now adjust the minimum query length to improve search performance.

    This Workflow provides partial matching of path components, allowing you to drill down into your filesystem with a space-separated query. Each "word" of the query will be matched against the components of a directory or file's path, so a three-word query will only match at least three levels down from the specified root directory.

    You can use a File Action to intiate a fuzzy search on a folder or to assign a keyword to perform a fuzzy search on that folder.

    Download

    Get the Workflow from GitHub or Packal.

    Commands
    fuzzy — List your Fuzzy Folders ↩ — Edit Fuzzy Folder settings ⌘+↩ — Start a Fuzzy Folder search with the associated keyword ⌥+↩ — Delete the keyword–Fuzzy Folder combination fzyup — Recreate the Script Filters from your saved configuration (useful after an update) fzyhelp — Open the help file in your browser Settings

    You can specify these settings globally as defaults for all Fuzzy Folders or on a per-folder basis. For ad-hoc searches via the Fuzzy Search Here file action, the default settings always apply.

    Use keyword fuzzy to view and edit settings.
    Minimum query length — The last "word" of a query must be this long to trigger a search. Default is 1, but increase this number if the search is too slow. This is very often the case if you're searching a large subtree and/or also choose to search files. Search scope — Choose to search only for folders, files or both. Note: In most cases, searches including files are significantly slower. Consider increasing the minimum query length to speed up slow searches. File Actions
    Fuzzy Search Here — Fuzzy search this folder Add Fuzzy Folder — Set a keyword for this folder for faster fuzzy searching Search result actions
    ↩ — Open folder in Finder ⌘+↩ — Browse folder in Alfred Bugs, questions, feedback

    You can open an issue on GitHub, or post in this thread.

    Licensing, other stuff

    This Workflow is made available under the MIT Licence.

    The icon was made by Jono Hunt.

    It uses docopt and Alfred-Workflow.
  12. Like
    deanishe reacted to ctwise in VMWare Fusion Controller   
    I created a workflow inspired by the Parallels controller workflow. It doesn't do screen captures since VMWare requires a username / password to do that, otherwise it's pretty similar. It's on alfpt or you can download it from here: http://tedwi.se/u/d4
     
    The following commands are available:
     
     
    vm list - Provides a list of VM's and their status (running or stopped). Copies path to clipboard. vm start [nogui] - List the VM's that are currently stopped so you can start them. Optionally, if you add 'nogui' it will start them without showing the VMWare window. vm stop [hard] / vm suspend [hard] / vm reset [hard] - List the VM's that are currently running so you can stop, suspend or reset them. Optionally, if you add 'hard' it will force the action. vm pause / vm unpause - Get a list of VM's that are currently running so you can pause or unpause them. A paused VM counts as running. vm snapshot <name> - Get a list of VM's that are currently running so you can create a named snapshot of a VM's current state, 'name' is not optional. vm ip - List the ip addresses of all running vms and copies the selected ip to the clipboard. The vm _must_ be running vmware tools for this to work. vm revert <name> - revert a vm to the named snapshot.   2013-02-07 - Add icons (cribbed from Jonas Erikson's VirtualBox controller)
  13. Like
    deanishe got a reaction from Bhishan in Recommendations for Sharing Workflows   
    Not sure if this is quite the right thread, but if you're distributing a workflow written in Python, *do not* ask users to install Python libraries in the system Python. Bundle them with your workflow.
    It's not ideal, but installing libraries into the system Python is very bad form. The chances are good that you'll break some other software doing the same naughty thing—or it will break your workflow—by installing an incompatible version of a library.
    It's trivial to install libraries directly in your workflow with "pip install --target=my/workflow/dir". Do that instead.
    In addition, bundling the libraries with your workflow means the workflow will sync across machines without problems.
  14. Like
    deanishe got a reaction from Ddyracer in Fuzzy Folders   
    Fuzzy search across folder subtrees.
     
    Update 10/09/2016:
    Added Alfred 3 support and removed Alfred 2 support. Added ability to self-update.  
    Update 10/04/2014:
    Added support for glob-style excludes. Unfortunately, these have to be added manually to the settings file at the moment. Update 05/04/2014:
    Now supports searching files as well as/instead of folders You can now adjust the minimum query length to improve search performance.

    This Workflow provides partial matching of path components, allowing you to drill down into your filesystem with a space-separated query. Each "word" of the query will be matched against the components of a directory or file's path, so a three-word query will only match at least three levels down from the specified root directory.

    You can use a File Action to intiate a fuzzy search on a folder or to assign a keyword to perform a fuzzy search on that folder.

    Download

    Get the Workflow from GitHub or Packal.

    Commands
    fuzzy — List your Fuzzy Folders ↩ — Edit Fuzzy Folder settings ⌘+↩ — Start a Fuzzy Folder search with the associated keyword ⌥+↩ — Delete the keyword–Fuzzy Folder combination fzyup — Recreate the Script Filters from your saved configuration (useful after an update) fzyhelp — Open the help file in your browser Settings

    You can specify these settings globally as defaults for all Fuzzy Folders or on a per-folder basis. For ad-hoc searches via the Fuzzy Search Here file action, the default settings always apply.

    Use keyword fuzzy to view and edit settings.
    Minimum query length — The last "word" of a query must be this long to trigger a search. Default is 1, but increase this number if the search is too slow. This is very often the case if you're searching a large subtree and/or also choose to search files. Search scope — Choose to search only for folders, files or both. Note: In most cases, searches including files are significantly slower. Consider increasing the minimum query length to speed up slow searches. File Actions
    Fuzzy Search Here — Fuzzy search this folder Add Fuzzy Folder — Set a keyword for this folder for faster fuzzy searching Search result actions
    ↩ — Open folder in Finder ⌘+↩ — Browse folder in Alfred Bugs, questions, feedback

    You can open an issue on GitHub, or post in this thread.

    Licensing, other stuff

    This Workflow is made available under the MIT Licence.

    The icon was made by Jono Hunt.

    It uses docopt and Alfred-Workflow.
  15. Like
    deanishe got a reaction from jmjeong in Workflow Library for Python   
    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).
     
  16. Like
    deanishe got a reaction from jmjeong in XML parse error in Alfred 2.2 [Fixed 2.3]   
    Right, sorry. It's hard to read the XML, as it's all on one line.
    I've tried parsing the XML from 'http://s.jmjeong.com/aa.xml' with a few different Python and Ruby parsers.
    Everything works perfectly except Alfred…
    So, you're probably right: there's a problem with Alfred and/or how it uses NSXMLParser.
    Best take this back to the bug reports forum. (I've had problems with Alfred no accepting valid XML myself, but Andrew insisted I was doing something wrong…)
  17. Like
    deanishe got a reaction from alexcory in Can't get `Run Script` to work but `Terminal Command` works   
    Chances are, when you run the command from Terminal, /usr/local/bin will be first on your PATH (use echo $PATH to find out), so calling git or rsync in a script will run the versions in /usr/local/bin.
    Alfred, however, ignores your PATH and will use the git and rsync in /usr/bin.
    I'm guessing you installed git and rsync from homebrew or the like, so they're almost certainly newer versions that the system ones. It's possible one of your options isn't understood by the older versions.
    You should always use full paths, e.g. /usr/bin/git not just git in workflow scripts to ensure you're using the same executables from Terminal and Alfred.
    .git is the folder that git creates when you make a directory a git repository. It's where .git keeps all its data. Remove that folder and you no longer have a repository.
    The --git-dir and --work-tree options tell git which directory it should operate on. By default, it uses the current working directory and searches up the file tree till it finds a .git directory.
    Personally, I wouldn't bother with those, but would do a chdir to the repository directory and just run /usr/bin/git add .. You might have to chdir back to the previous working directory afterwards (which is the workflow root directory when run from Alfred).
  18. Like
    deanishe got a reaction from dfay in AppScripts — List, search and run AppleScripts for the active application   
    That's a very good idea. I've added it to the workflow and the new version (1.1) is available from Packal and GitHub (links in the OP).
  19. Like
    deanishe got a reaction from Jb_Bryant in Date Text Expansion Workflow   
    Ta for the plug 
     
    The workflow also has a forum thread here.
  20. Like
    deanishe reacted to Jb_Bryant in Date Text Expansion Workflow   
    Actually I did just find this workflow which is pretty nice - http://www.packal.org/workflow/relative-dates
     
    I'll probably keep both around but that one is pretty great.
  21. Like
    deanishe reacted to Jono in AppScripts — List, search and run AppleScripts for the active application   
    Excellent workflow, thanks!
     
    Here's my version of the AppleScripts folder, if you want to use that one http://d.pr/f/DTXn
     
    (And I'm one of those that prefer Keyboard Maestro over FastScripts )
       
  22. Like
    deanishe got a reaction from alexcory in Can't get `Run Script` to work but `Terminal Command` works   
    It's possible that the discrepancy between your shell environment (set up by .bashrc, .profile etc.) and the one Alfred uses (launchd's environment) is causing the problem.
     
    Where are your git and rsync commands? In /usr/bin or /usr/local/bin?
  23. Like
    deanishe got a reaction from Jono in AppScripts — List, search and run AppleScripts for the active application   
    2015-09-17: Major update to version 2

    Alfred AppScripts Workflow

    List, search and run/open AppleScripts for the active application.



    Download

    The workflow can be downloaded from GitHub or Packal.

    The source code is also available on GitHub.

    Usage
    .as [<query>] — Show/search list of AppleScripts for the active application ↩ — Run the selected script. ⌘+↩ — Open the selected script in Script Editor. ⌥+↩ — Reveal the selected script in Finder. appscripts [<query>] — Show workflow configuration. Help – Open this file in your browser. (No) Update Available — Whether or not the workflow can be updated. Action the item to update or force an update check. Search Directories Recursively – Whether the script directories should be searched recursively. Use with some caution. Edit Script Directories — Open the configuration file in your default editor. The file contains a detailed description of how it works. Reset to Defaults — Delete configuration and cache files. Where are these scripts?

    The workflow comes with a default set of directories. These are defined in a settings file that you can edit yourself. Use the Edit Script Directories option in the configuration (keyword appscripts) to open the file in your editor.

    These are the default directories. {app_name} will be replaced with the name of the currently active application, e.g. BBEdit or OmniFocus, and {bundle_id} with the application's bundle ID, e.g. com.barebones.bbedit or com.omnigroup.OmniFocus2:
    ~/Library/Scripts/Applications/{app_name} ~/Library/Scripts/Applications/{bundle_id} ~/Library/Application Scripts/{app_name} ~/Library/Application Scripts/{bundle_id} ~/Library/Application Support/{app_name}/Scripts ~/Library/Application Support/{bundle_id}/Scripts ~/Library/Containers/{bundle_id}/Data/Library/Application Support/{app_name}/Scripts Any .scpt, .applescript or *.scptd (script bundle) files found within the above directories will be shown.

    If you add a directory path that doesn't contain {app_name} or {bundle_id}, it will match every application and the scripts will always be shown. See the settings file (AppScript Directories.txt) for more information.

    Licence, thanks

    The workflow code and the bundled Alfred-Workflow and docopt libraries are all licensed under the MIT Licence.

    The workflow icon was kindly donated by @Jono.
  24. Like
    deanishe reacted to dfay in AppScripts — List, search and run AppleScripts for the active application   
    This is great, but I have at least one app that stores its scripts in
     
    ~/Library/Application Support/appname/Scripts
     
    Would it easily be possible to have the workflow search here as well>?
  25. Like
    deanishe got a reaction from xilopaint in Packal Search — search for cool new workflows from the comfort of Alfred   
    Thanks!

    I think I found the bug. I've fixed it (hopefully) and uploaded the new version (1.1.1) to Packal and GitHub.
     
    It should fix the problem. You should force the workflow to update its cache first with packal update, however, as the cache will contain bad data.
×
×
  • Create New...