Last active
September 22, 2020 02:41
-
-
Save awave1/f4e0bb03328fc29053af9f77e5c238a4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function dl | |
set prev (pwd) | |
set songs "$HOME/Documents/Music/Songs" | |
cd $songs | |
youtube-dl -x --audio-format \"wav\" $argv | |
cd $prev | |
end | |
This file contains hidden or 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
# open powershell | |
# open $profile in an editor (`code $profile`, for example) | |
# paste this function | |
# save the file and type `. $profile` to update the current PS session | |
function dl { | |
param ( | |
[switch] $acapella | |
) | |
$prev_location = (Get-Location).Path | |
if ($acapella) { | |
Set-Location 'D:\samples and oneshots\ACAPELLAS' | |
} | |
else { | |
Set-Location 'D:\samples and oneshots\Songs' | |
} | |
youtube-dl.exe -x --audio-format wav $args[0] | |
Set-Location $prev_location | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment