Skip to main content

Alfred Workflow Script Filter power tool..

Project description

Documentation Status!--None.svg?style=social

Welcome to afwf Documentation

Alfred Workflow Script Filter power tool.


afwf is released on PyPI, so all you need is:

$ pip install afwf

To upgrade to latest version:

$ pip install --upgrade afwf

最佳实践中, Script Filter 的设置应该是这样的:

  • with space: checked

  • Language: /bin/bash

  • with input as {query}

  • run behavior:
    • Queue Mode: Terminate previous script

    • Queue Delay: Immediately after each character typed

    • Always run immediately for first typed arg character: checked

    • Argument: Automatically trim irrelevant arg whitespaces

    • Don’t set argv when query is empty: unchecked

  • Escaping: double quotes, backslashes

然后 Script 里这么写:

/path/to/python 'handler_id {query}'

handler_id 是一个字符串, 唯一对应一个 python “handler” 函数. 所谓 “handler” 就是一个 python 函数, 接受一个 ‘{query}’ 的字符串输入, 创建一个 Workflow 对象, 返回一些 Item.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

afwf-0.0.3.tar.gz (35.3 kB view hashes)

Uploaded Source

Built Distribution

afwf-0.0.3-py2.py3-none-any.whl (40.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page