Developing Alfred5 workflow using alfred5 python package
programming, alfred5, alfred workflow, python, macOS
🔰 How to Create Workflow
Preparing to Code Workflow using alfred5 package and python
Init your project directory
Create
src
folderPut your codes and
requirements.txt
tosrc
folders
⚠️ If u installed all of requirements, dont need to create
requirements.txt
file insrc
Understanding alfred5
use-cases
alfred5
use-casesVia
SnippetsClient
API create custom snippets programmaicallyVia
WorkflowClient
API create custom alfred workflowCraete
requirements.txt
file for your python project to letalfred5
installs them if needed 🙃To install
from requirements.txt
do all import packages insidemain
Use
global
keyword to access imported packages globallyclient.query
is the query stringclient.page_count
is the page count for pagination results
Dont need to add
alfred5
torequirements.txt
Use
WorkflowClient.log
to log your message to alfred debuggerUse
WorkflowClient(main, cache=True)
method to use caching systemJust do it for static (not timebased nor any dynamic stuff) response
Db path is
db/results.yml
also you can see it from workflow debug panel
⭐️ Example Project
🪪 License
Last updated