How do I create a mac application using automator, that gets a file that I "drop" in it and executes a python script with this file as an argument?
I tried solutions from various questions that suggest creating a "service" in Automator, but I don't see such option in Automator in Monterey
/bin/bash/
"$1"
to get a file as argument):cd my_project_directory
source .venv/bin/activate
python my_script.py "$1"
EDIT:
If you want to be able to drop several files on your app at once and run a script for each of them in a sequence, you can change the last line to the following code:
for f in "$@"
do
python my_script.py "$f"
done