Search the Community
Showing results for tags 'libraries'.
Found 2 results
Please see this newer thread for a more up-to-date list of libraries that support Alfred 3. Since the introduction of Alfred 2, there have been several extremely useful utility classes and other helpers crop up that simplify a lot of the tedious, common tasks associated with creating workflows. These utilities are developed and maintained by community members, not by the Alfred team. All support requests for these utilities should be directed to the original author. If you have another utility class that needs to be included in this list, send me a message or email (firstname.lastname@example.org) with information about it (name, description, short list of features, link to post or download page) and I will make sure that it gets added to the list. Special thanks to all the developers for their hard work and for sharing their work with us. Python Alfred-Workflow (by deanishe) A state-of-the-art Python library for Workflow developers. Support for Alfred 2 and 3. 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 just 140 KB. Main features 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. Easy-to-use storage of Workflow settings. 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.) Now with solid support for multi-word queries. Extremely lightweight, but full-featured, HTTP library with Requests-like interface, but just 12 KB instead of > 2 MB. Convenient access to standard OS X 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. Supports Alfred's new (version 2.3) modifier-specific subtitles. 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 orTerminal 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. Accent-folding, so you can search non-ASCII text (e.g. voilà will be matched by voila) Functions to support migrating settings/data from older versions of your workflow. Well supported and kept up-to-date with Alfred's features as they are added. Alfred 3-only features Workflow variables Advanced modifiers Alfred 3-only updates 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 Alp (developed by phyllisstein) alp is a Python module for developing Alfred workflows that bridges the gaps between Python and OS X and Python and Alfred, making the process of creating a workflow quick and easy. As it's essentially a collection of shortcuts for common and repetitive tasks, developers will find that working with alp results in less and more efficient code and a generally more sane workflow development experience. A painstaking guide to its various features, bells, and whistles is available in the README at the Github repository. Features: Simplified generation of feedback XML. Shortcuts for bundle ID, storage paths, settings, and arbitrary plist and JSON files. OS X interaction features, including the sending of additional notifications, interaction with the Keychain, and interaction with Spotlight. Internet interaction features, including bundled modules for making and caching HTTP requests, parsing markup data, and sending e-mail. The ability to remove unneeded modules for a svelte workflow bundle. Alfred-Python (developed by JinnLynn) alfred-python is a full-featured python module that helps building Alfed workflow quick and easy. Features: Simple feedback XML generation Provides functions for storing or retrieving cache data Workflow configuration management Includes an easy way to download remote file Easily get bundle id, query arguments, etc. More code example can be found on my own workflows. PHP Workflows (developed by David Ferguson) Workflows is a PHP library for building Alfred 2 workflows using PHP. Installation is quick and easy. Just drop in the Workflows.php class file, import it into your code, and initialize it. Full documentation, with usage examples can be found on David's blog. Features: Simple XML generation Read/writing files as plain text, json, etc. Read/write plist values Find local files Provide access to commonly used paths (home, cache, current, data storage, etc) Easy HTTP/cURL requests Haskell AlfredLibraryInHaskell (developed by raguay.customct) This is a Haskell library for creating Alfred workflows. AppleScript qWorkflow (developed by ursanrazvan) qWorkflow is an AppleScript library for creating workflows with Alfred 2. This library provides an object-oriented approach for working with plist settings files, reading and writing data to files, generating Alfred feedback results, requesting remote data, parsing JSON data, and more. Features: object-oriented approach to write less & more readable code heavily documented with code samples internal workflow introspection (finding the bundle ID, cache & storage paths) generate Alfred-compatible XML feedback with ease saving & retrieving workflow-related settings (with support for default settings file) remote data requests, as well as JSON support sending notifications through the Notification Center various internal utilities that improve AppleScript (string and date manipulation, file system utilities) More info & example workflows created with this support library can be found on the project's github repo Go goAlfred (Developed by raguay.customct) This go library is used to create workflows for Alfred 2 easier in the go language from Google (http://golang.org/). It will automatically create your cache and data directories. It also creates the xml listing for the feedback system. Examples included. Installation and Usage You install the library with:go get github.com/raguay/goAlfred # (You might have to use sudo). Any program that you want to use the library, just place this line in it: import "github.com/raguay/goAlfred" Functions The accessible function calls are: goAlfred.BundleId() - This will get your Bundle Id for your workflow. goAlfred.Cache() - This function returns the location of your cache directory. goAlfred.Home() - This function returns the location of your home directory. goAlfred.Data() - This function returns the location of your workflow's data directory. goAlfred.Path() - This function returns the location of your workflow's directory. goAlfred.Error() - Returns the last error received. AddResult( uid string, arg string, title string, sub string, icon string, valid string, auto string, rtype string) - This function allows you to build up the xml string for returning to Alfred. AddResultSimilar(instring string, uid string, arg string, title string, sub string, icon string, valid string, auto string, rtype string) - This function allows you to build up the xml string for returning to Alfred only if the title is similar to the instring given. goAlfred.SetDefaultString(title string) - This function sets a different default message if no results have been added. goAlfred.GetXML() - This function returns the XML string that needs to be given to Alfred. Bash BashWorkflowHandler (developed by _mk_) Features: create feedback xml save/read preferences volatile and non-volatile get workflow's cache dir get workflow's data dir get workflow's bundle id Usage examples can be found in the README at the GitHub repo. Bash Workflow Framework (developed by djc) BASH workflow framework which makes it simple to create a workflow which allows you to display feedback within Alfred after selecting a result, getting around the issue that "Script Filters are the only way to pass feedback to Alfred." Built to create easy reference workflows, or any other kind of workflow which does not want to leave Alfred immediately on selection of a result. Features: - Two modes for two different kinds of data: static and dynamic. - Creation of a static workflow only requires modification of a CSV-like file. - Static mode handles searching on query for you. - Dynamic workflow can be created using a BASH library ARF+. - Both modes allow for result and field-specific icons, validities, arguments, and autocomplete attributes. Extensive documentation in the README, and examples are included with download. Two methods of installation can be found on the github page. Ruby Alfred2-Ruby-Template (developed by zhauwu) A template for Ruby-based Alfred 2 workflow development. Features: Use standard bundler to easily package, manage, and update ruby gems in the workflow. Friendly exception and debug output to the Mac OS X Console Automate rescue feedback items to Alfred when something goes wrong. Automate saving and loading cached feedback Alfredo (developed by Dennis Paagman) Alfredo is simple ruby gem that makes it easy to create workflows and items to it. You can get started with only 4 lines of code. Features: Generates valid Workflow XML Add items with one line of code Supports all Alfred 2 workflow features Swift AlfredSwiftLibrary (developed by raguay.customct) General Alleyoop (developed by phyllisstein) Alleyoop is a meta-workflow that implements a system for updating other workflows. Users can make use of its features by downloading the workflow module and entering the query oop, which searches for compatible workflows and checks for available updates. Developers can implement Alleyoop compatibility with two simple, human-readable JSON files, described in the original post: one stored on a remote server, one placed in the workflow's folder. Alfred Dependency Downloader Framework (developer by Shawn Rice) Do you want to have versioned libraries and utilities live side-by-side? Do you want to make your workflows smaller but keep or expand the functionality with helper apps? Do you want to make sure that everything works regardless of whether Gatekeeper is active on other users' computers? Then you might consider implementing the Alfred Bundler* dependency framework in your workflows. If you want to see a _very_ basic implementation, then download an example workflow from Packal and open it up to see the workflow's anatomy. The libraries / utilities mentioned below are just pre-defined assets that you can load with no additional work. You can actually use this framework for any asset** by including a small JSON file with your workflow. Take a look at the documentation page on Github or the original post for more information.