Update aliases

This commit is contained in:
2015-10-16 01:11:24 -04:00
parent 397ff6fda8
commit a7fcc5f937
4 changed files with 45 additions and 21 deletions

View File

@@ -6,6 +6,32 @@ function activate_virtualenv() {
fi
}
function play {
# Skip DASH manifest for speed purposes. This might actually disable
# being able to specify things like 'bestaudio' as the requested format,
# but try anyway.
# Get the best audio that isn't WebM, because afplay doesn't support it.
# Use "$*" so that quoting the requested song isn't necessary.
youtube-dl --default-search=ytsearch: \
--youtube-skip-dash-manifest \
--output="${TMPDIR:-/tmp/}%(title)s-%(id)s.%(ext)s" \
--restrict-filenames \
--format="bestaudio[ext!=webm]" \
--exec=afplay "$*"
}
function mp3 {
# Get the best audio, convert it to MP3, and save it to the current
# directory.
youtube-dl --default-search=ytsearch: \
--restrict-filenames \
--format=bestaudio \
--extract-audio \
--format="bestaudio[ext!=webm]" \
--audio-quality=1 "$*" \
--exec=afplay "$*"
}
function git-new-remote-tracking {
git checkout -b $1 && git push -u origin $1
}