constants¶
Alfred Workflow Script Filter protocol constants.
All special string values defined by the Alfred Script Filter JSON spec are
collected here as BetterStrEnum subclasses so that
workflow developers can use them without memorising raw strings.
Ref: https://www.alfredapp.com/help/workflows/inputs/script-filter/json/
- class afwf.constants.IconTypeEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Allowed values for
icon.typein a Script Filter item.fileicon— Alfred uses the file-system icon of the file aticon.pathfiletype—icon.pathis treated as a UTI (e.g."com.apple.rtfd")(omitted) —
icon.pathis a path relative to the workflow root folder
Ref: search
icon : OBJECTin the Alfred Script Filter JSON docs.
- class afwf.constants.ItemTypeEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Allowed values for
item.typein a Script Filter item.file— Alfred treats the result as a file; checks existence before showingfile:skipcheck— Same asfilebut skips the existence check
Ref: search
type : STRINGin the Alfred Script Filter JSON docs.
- class afwf.constants.ModEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Modifier key identifiers for the
item.modsobject.Used as keys inside
modsto define alternate behaviour when the user holds a modifier key while actioning an item.Note: when a mod entry contains a
variableskey, it replaces (not merges with) the item’svariables. An empty"variables": {}on a mod explicitly prevents inheriting the item’s variables.Ref: search
mods : OBJECTin the Alfred Script Filter JSON docs.
- class afwf.constants.VarKeyEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Variable key names used by this framework’s built-in
set_*helpers onItem.These variable names are conventions understood by the accompanying Alfred workflow widgets (Conditional, Open File, Run Script, etc.).