Quickstart Bash

Bash

1. Download the bundlet, and place it in your workflow's root directory.

2. Include the bundlet

. alfred.bundler.sh

Read the implementation page for more advanced ways to initialize the bundler.

Using the Bundler

Load a Library
. "$(AlfredBundler::library BashWorkflowHandler)"
Load a Utility
pashua="$(AlfredBundler::utility Pashua)"
Loading a utility returns the full path to the utility as it needs to be called. You still need to execute it with the same arguments that you would do already.
Load an Icon
icon="$(AlfredBundler::icon elusive fire 000000 true)"
Log a Message to the Console
AlfredBundler::log "This is a log message." INFO console
Log levels are DEBUG, INFO, WARNING, ERROR, CRITICAL.
Log a Message to the Log File
AlfredBundler::log "This is a log message." CRITICAL file
The log file will be in the workflow's data directory with the name {workflow-bundle-id}.log. Unfortunately, this path cannot be changed when using the Bash Bundler.
Log a Message to the Console and the Log File
AlfredBundler::log "This is a log message." WARNING both
Bonus: the Bash Bundler also ships with a set of functions to do floating point math. These functions were necessary to write for the icon color conversion algorithms, but that means that they're available for you to use.

Questions?

Post on the Alfred Forum thread.

Bug Reports?

Open an issue in the Github queue.