Skip to main content

Alfred Workflow Script Filter power tool..

Project description

Documentation Status https://github.com/MacHu-GWU/afwf-project/workflows/CI/badge.svg https://codecov.io/gh/MacHu-GWU/afwf-project/branch/master/graph/badge.svg https://img.shields.io/pypi/v/afwf.svg https://img.shields.io/pypi/l/afwf.svg https://img.shields.io/pypi/pyversions/afwf.svg https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
https://img.shields.io/badge/Link-Document-blue.svg https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Source_Code-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to afwf Documentation

Alfred Workflow Script Filter power tool.

Install

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 main.py '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.2.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

afwf-0.0.2-py2.py3-none-any.whl (39.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file afwf-0.0.2.tar.gz.

File metadata

  • Download URL: afwf-0.0.2.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.11

File hashes

Hashes for afwf-0.0.2.tar.gz
Algorithm Hash digest
SHA256 65bc13876643c2bc40bfa8743e12b30b7149f74541d376183897d115d2446535
MD5 ea6f81e1184fb916d9f7f9c7d1d06af6
BLAKE2b-256 359668366012f319f55727d8ec9801063fc98f5a0c4f6445b3fa6a32781be708

See more details on using hashes here.

File details

Details for the file afwf-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: afwf-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 39.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.11

File hashes

Hashes for afwf-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 89430540d7c03f193544338ca583beee0c85fcd9dab52216175000a2d7ba0e19
MD5 c7bf7f588c8edec59a2d6e21bdc156c1
BLAKE2b-256 2f186543c407db8937437d0d7c1bf15e26d87634f66b661af7f5325c3f85ba89

See more details on using hashes here.

Supported by

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