Last active
February 19, 2023 18:30
-
-
Save Arnav-arw/cba93e646dce5051caa4fea3279b8844 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title Music-DL | |
# @raycast.mode compact | |
# | |
# Optional parameters: | |
# @raycast.icon 🎵 | |
# @raycast.needsConfirmation false | |
# @raycast.argument1 {"type": "text", "placeholder": "Song Link"} | |
# | |
# Documentation: | |
# @raycast.description Downloads the song | |
# @raycast.author Arnav Singhal | |
# @raycast.authorURL https://github.com/arnav-arw | |
# <SPOTIPY_CLIENT_ID> | |
# <SPOTIPY_CLIENT_SECRET> | |
ytlink="$1" | |
cd /Users/arnavsinghal/Desktop | |
if [[ $ytlink = *"spotify"* ]]; then | |
SPOTIPY_CLIENT_ID='<SPOTIPY_CLIENT_ID>' SPOTIPY_CLIENT_SECRET='<SPOTIPY_CLIENT_SECRET>' spotify_dl -l $ytlink -o ./ | |
elif [[ $ytlink = *"youtube"* ]]; then | |
yt-dlp -f 140 $ytlink | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment