28 lines
831 B
Plaintext
Raw Normal View History

2024-09-12 08:36:06 -07:00
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
2024-09-12 09:21:44 -07:00
# @raycast.title Get YouTube Transcript
2024-09-12 08:36:06 -07:00
# @raycast.mode fullOutput
# Optional parameters:
2024-09-12 09:21:44 -07:00
# @raycast.icon 🧠
# @raycast.argument1 { "type": "text", "placeholder": "Input text", "optional": false, "percentEncoded": true}
2024-09-12 08:36:06 -07:00
# Documentation:
2024-09-12 09:21:44 -07:00
# @raycast.description Run fabric -y on the input text of a YouTube video to get the transcript from.
2024-09-12 08:36:06 -07:00
# @raycast.author Daniel Miessler
# @raycast.authorURL https://github.com/danielmiessler
# Set PATH to include common locations and $HOME/go/bin
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/go/bin:$PATH"
2024-09-12 09:21:44 -07:00
# Use the PATH to find and execute fabric
if command -v fabric >/dev/null 2>&1; then
fabric -y "${1}"
2024-09-12 08:36:06 -07:00
else
2024-09-12 09:21:44 -07:00
echo "Error: fabric command not found in PATH"
2024-09-12 08:36:06 -07:00
echo "Current PATH: $PATH"
exit 1
fi