https://github.com/caleb531/alfred-workflow-packager

A command-line utility for packaging and exporting Alfred workflows with ease

https://github.com/caleb531/alfred-workflow-packager

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary

Keywords

alfred cli python

Keywords from Contributors

labels
Last synced: 6 months ago · JSON representation

Repository

A command-line utility for packaging and exporting Alfred workflows with ease

Basic Info
Statistics
  • Stars: 27
  • Watchers: 2
  • Forks: 2
  • Open Issues: 0
  • Releases: 13
Topics
alfred cli python
Created over 9 years ago · Last pushed 7 months ago
Metadata Files
Readme License

README.md

Alfred Workflow Packager

Copyright 2016-2025 Caleb Evans
Released under the MIT license

Alfred Workflow Packager is a command-line utility which makes the process of packaging and exporting an Alfred workflow incredibly quick and easy. The utility supports Alfred 3 and up, on projects running Python 3 (Python 2 is no longer supported).

Setup

You can install the utility via pip3, either globally or within a virtualenv:

sh pip3 install alfred-workflow-packager

Usage

1. Create configuration file

Once you've installed AWP, you must configure it for every project where you wish to use it. To do so, create a packager.json file in the root directory of your project; this file configures AWP for that particular project.

Example

json { "export_files": [ "Fruit.alfredworkflow" ], "bundle_id": "com.yourname.fruit", "readme": "README.txt", "resources": [ "icon.png", "src/*.py", "src/data/*.json" ] }

Required settings

export_files

The paths of the exported workflows (relative to your project directory).

bundle_id

The unique bundle ID of your workflow. You must have one set in the installed workflow, or AWP will not be able to find your workflow when packaging.

resources

A list of zero or more files/folder patterns representing files or folders to copy from your project to the installed workflow. The directory structures and filenames are preserved when copying.

Local project:

- icon.png - fruit - apple.py - banana.applescript - orange.php

Installed workflow (before running utility):

- info.plist - special_file.json

packager.json resources:

json [ "icon.png", "fruit/*.json" ]

Installed workflow (after running utility):

- info.plist - icon.png - special_file.json - fruit - apple.py - banana.applescript - orange.php

Note that files and folders already present in the installed workflow are not touched if they are not in the resources list.

Optional settings

readme

The path to the README file to use for this workflow; the About this Workflow field in your workflow is populated with the contents of this file.

2. Run utility

You can run the utility via the awp command:

sh awp

Running awp will copy those project resources listed in packager.json to the installed workflow (in their respective locations), but only if their contents or permissions have changed. If you ever need to ignore this equality check, you can force the copying of all files/directories by passing --force / -f.

sh awp --force

sh awp -f

Setting the workflow version

Passing the --version option (also -v) to awp allows you to set the version of the installed workflow directly. I highly recommend using semantic versioning to version your workflow releases.

sh awp --version 1.2.0

sh awp -v 1.2.0

Exporting the workflow

When you're pleased with your work and you're ready to publish a new release, you can export the installed workflow to your project directory by passing the --export flag (or -e) to awp.

sh awp --export

sh awp -e

Note that you can set the version and export the workflow simultaneously:

sh awp -v 1.2.0 -e

New in AWP v1.1.0: If you wish to temporarily export the workflow to a different file (different from export_files in packager.json), you can pass one or more optional paths to --export:

sh awp -v 1.3.0-beta.1 -e ~/Desktop/fruit-beta-alfred-5.alfredworkflow

4. Configure workflow objects

The last important step is to update any script objects in your workflow (i.e. objects of type Script Filter, Run Script, etc.) to reference the files copied to the installed workflow directory.

You should set the Language to /bin/bash and use the appropriate shell command to call your script. Use "$@" if your input is passed as argv, or "{query}" if your input is passed as {query}.

Python

sh /usr/bin/python3 -m fruit.apple "$@"

sh /usr/bin/python3 -m fruit.apple "{query}"

AppleScript

sh /usr/bin/osascript fruit/banana.applescript "$@"

sh /usr/bin/osascript fruit/banana.applescript "{query}"

PHP

sh /usr/bin/php fruit/orange.php "$@"

sh /usr/bin/php fruit/orange.php "{query}"

Owner

  • Name: Caleb Evans
  • Login: caleb531
  • Kind: user
  • Location: Carlsbad, CA

Hi, I'm Caleb, a web developer who lives for Christ by building enjoyable apps and useful tools. I hope you are blessed by what I've made!

GitHub Events

Total
  • Create event: 1
  • Issues event: 2
  • Release event: 2
  • Watch event: 1
  • Issue comment event: 2
  • Push event: 9
  • Pull request event: 1
  • Pull request review event: 1
Last Year
  • Create event: 1
  • Issues event: 2
  • Release event: 2
  • Watch event: 1
  • Issue comment event: 2
  • Push event: 9
  • Pull request event: 1
  • Pull request review event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 116
  • Total Committers: 2
  • Avg Commits per committer: 58.0
  • Development Distribution Score (DDS): 0.026
Top Committers
Name Email Commits
Caleb Evans c****b@c****e 113
dependabot[bot] 4****]@u****m 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 7
  • Average time to close issues: 20 days
  • Average time to close pull requests: 5 months
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 2.5
  • Average comments per pull request: 0.71
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 6
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: about 1 month
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • adwaraki (1)
  • kkew3 (1)
Pull Request Authors
  • dependabot[bot] (6)
  • April-June-August (1)
Top Labels
Issue Labels
bug (1) question (1)
Pull Request Labels
dependencies (6)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 2,311 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 4
  • Total versions: 22
  • Total maintainers: 1
pypi.org: alfred-workflow-packager

A CLI utility for packaging and exporting Alfred workflows

  • Versions: 22
  • Dependent Packages: 0
  • Dependent Repositories: 4
  • Downloads: 2,311 Last month
Rankings
Dependent repos count: 7.5%
Dependent packages count: 10.1%
Average: 11.1%
Downloads: 15.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • Pygments ==2.11.2
  • attrs ==21.4.0
  • bleach ==4.1.0
  • certifi ==2021.10.8
  • charset-normalizer ==2.0.12
  • colorama ==0.4.4
  • docutils ==0.18.1
  • flake8 ==4.0.1
  • idna ==3.3
  • importlib-metadata ==4.11.1
  • jsonschema ==4.4.0
  • keyring ==23.5.0
  • mccabe ==0.6.1
  • packaging ==21.3
  • pkginfo ==1.8.2
  • pycodestyle ==2.8.0
  • pyflakes ==2.4.0
  • pyparsing ==3.0.7
  • pyrsistent ==0.18.1
  • readme-renderer ==32.0
  • requests ==2.27.1
  • requests-toolbelt ==0.9.1
  • rfc3986 ==2.0.0
  • six ==1.16.0
  • tqdm ==4.62.3
  • twine ==3.8.0
  • urllib3 ==1.26.8
  • webencodings ==0.5.1
  • zipp ==3.7.0
setup.py pypi
  • jsonschema *