Developing Alfred5 workflow using alfred5 python package
programming, alfred5, alfred workflow, python, macOS
Last updated
Was this helpful?
programming, alfred5, alfred workflow, python, macOS
Last updated
Was this helpful?
Create src
folder
Put your codes and requirements.txt
to src
folders
⚠️ If u installed all of requirements, dont need to create
requirements.txt
file insrc
alfred5
use-casesVia SnippetsClient
API create custom snippets programmaically
Via WorkflowClient
API create custom alfred workflow
Craete requirements.txt
file for your python project to let alfred5
installs them if needed 🙃
To install from requirements.txt
do all import packages inside main
Use global
keyword to access imported packages globally
client.query
is the query string
client.page_count
is the page count for pagination results
Dont need to add alfred5
to requirements.txt
Use WorkflowClient.log
to log your message to alfred debugger
Use WorkflowClient(main, cache=True)
method to use caching system
Just 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