My command in Terminal works perfectly. I just don't know how to make it work in Hazel.
This is what I'm doing now:
- Code: Select all
LONG_FILENAME="$1"
FILESIZE=`ls -lh *.mp4 $1`
curl -X POST --data-urlencode "payload={\"channel\": \"#handbrake-processing\", \"username\": \"Handbrake Bot\", \"text\": \"*$(basename $LONG_FILENAME)* has started processing. It started as $(basename $FILESIZE)\", \"icon_emoji\": \":arrow_forward:\"}" https://hooks.slack.com/services/XXX/YYY/ZZZ
In terminal I get the right size for my .mp4 (which is what I'm targeting). But in Hazel, it's running on the whole contents of the directory, which makes me think the
- Code: Select all
FILESIZE=`ls -lh *.mp4 $1`
is wrong.
How do I pass that into Hazel? Quotes? Double Quotes? Triple Quotes? No quotes? That's what I can't find any documentation on.