From 18147de7ee477f5a82681cf0f11eea825f66c3f0 Mon Sep 17 00:00:00 2001 From: Daniel Miessler Date: Thu, 12 Sep 2024 08:42:47 -0700 Subject: [PATCH] Added yt raycast script. --- patterns/raycast/yt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/patterns/raycast/yt b/patterns/raycast/yt index 3003212..0bd0bbb 100644 --- a/patterns/raycast/yt +++ b/patterns/raycast/yt @@ -2,7 +2,7 @@ # Required parameters: # @raycast.schemaVersion 1 -# @raycast.title yt +# @raycast.title Extract YouTube Info # @raycast.mode fullOutput # Optional parameters: @@ -10,18 +10,20 @@ # @raycast.argument1 { "type": "text", "placeholder": "YouTube link", "optional": false, "percentEncoded": true } # Documentation: -# @raycast.description Run fabric yt on a YouTube link +# @raycast.description Run yt on a YouTube link # @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" -# Use the PATH to find and execute fabric -if command -v fabric >/dev/null 2>&1; then - yt {1}" +# Check if yt command is available +if command -v yt >/dev/null 2>&1; then + # Directly call yt with the YouTube link + yt "${1}" else - echo "Error: fabric command not found in PATH" + echo "Error: yt command not found in PATH" echo "Current PATH: $PATH" exit 1 fi +