This is a Haskell library for creating Alfred workflows.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Alfred.cabal
Alfred.hs
LICENSE
README.md
Setup.hs
_Alfred.hsplay
stack.yaml

README.md

AlfredLibraryInHaskell

This is a Haskell library for creating Alfred workflows. The library has the following functions:

addItem

This adds an item to the xml list for a script filter. This function expects all of the script filter items to be defined. EX: addItem uid arg valid autocomplete title subtitle icon.

addItemBasic

This calls the adItem with the valid set to yes, and icon set to icon.png.

condAddItemTitle

This creates and XML item if the condition input is contained in the Title.

condAddItemBasicTitle

This uses condAddItemTitle to conditionally add an XML item based on the title with some of the parameters given default values.

condAddItemSubTitle

This creates and XML item if the condition input is contained in the Sub Title.

condAddItemBasicSubTitle

This uses condAddItemSubTitle to conditionally add an XML item based on the sub title with some of the parameters given default values.

getBundleID

This gets the Alfred Bundle ID form the workflow.

getAlfredDataFileContents

This function returns the contents of the named file in the Alfred data directory for the workflow.

putAlfredDataFileContents

This function expects a file name and a string. The string is written to the file name in the Alfred data directory.

getAlfredCacheFileContents

This function expects a file name and a string. The string is written to the file name in the Alfred cache directory.

putAlfredCacheFileContents

This function expects a file name and a string. The string is written to the file name in the Alfred cache directory.

This repository also has the cases.hs Haskell program for creating the Haskell Case Converter workflow for Alfred. It gives a good example of using this library.

For more code, please visit my web site at Custom Computer Tools.