Update aliases and vimrc

This commit is contained in:
Michael Campagnaro 2023-07-14 17:29:59 -04:00
parent f636229f5c
commit 9b5159e705
2 changed files with 18 additions and 5 deletions

View File

@ -353,8 +353,9 @@ make_vid_dir_and_cd_into() {
function my_transcribe_video() { function my_transcribe_video() {
file="$1" file="$1"
output="$2" output="$2"
include_small=$3
if [[ $file == "" ]]; then if [[ $file == "" ]]; then
printf "Usage: <input video> <optional output name>\n" error "Usage: <input video> <optional output name>"
return return
fi fi
if [[ $output == "" ]]; then if [[ $output == "" ]]; then
@ -365,14 +366,18 @@ function my_transcribe_video() {
# catches most words. Small and medium can do better word detection at # catches most words. Small and medium can do better word detection at
# times, but suffer from bad punctuation. Medium is particularly bad and # times, but suffer from bad punctuation. Medium is particularly bad and
# not adding commas and periods. # not adding commas and periods.
transcribe-video "$file" "$output" tiny base if [[ $include_small -eq 1 ]]; then
transcribe-video "$file" "$output" tiny base small
else
transcribe-video "$file" "$output" tiny base
fi
} }
function my_transcribe_video_all_models() { function my_transcribe_video_all_models() {
file="$1" file="$1"
output="$2" output="$2"
if [[ $file == "" ]]; then if [[ $file == "" ]]; then
printf "Usage: <input video> <optional output name>\n" error "Usage: <input video> <optional output name>"
return return
fi fi
if [[ $output == "" ]]; then if [[ $output == "" ]]; then
@ -544,6 +549,14 @@ download_youtube_uploads_list() {
printf "${BOLD}Finished downloading the upload list\n${NORMAL}" printf "${BOLD}Finished downloading the upload list\n${NORMAL}"
} }
function download_youtube_audio() {
if [[ $1 == "" ]]; then
error "Usage: <url>"
return
fi
yt-dlp.exe -f "140" "$1"
}
# Download Twitch chat transcript # Download Twitch chat transcript
actually_download_twitch_chat() { actually_download_twitch_chat() {
local url="$1" local url="$1"
@ -949,7 +962,7 @@ alias yt-playlist-list='download_youtube_playlist_list '
alias yt-playlist-1080='download_youtube_playlist "137+140"' alias yt-playlist-1080='download_youtube_playlist "137+140"'
alias yt-playlist-720='download_youtube_playlist "136+140"' alias yt-playlist-720='download_youtube_playlist "136+140"'
alias yt-playlist-tiny='download_youtube_playlist "160+140"' alias yt-playlist-tiny='download_youtube_playlist "160+140"'
alias yt-audio='yt-dlp.exe -f "140"' alias yt-audio='download_youtube_audio'
#------------------------------------------------- #-------------------------------------------------
# Twitch Vid DL # Twitch Vid DL

2
.vimrc
View File

@ -656,7 +656,7 @@ vnoremap p "_dP
" Switch between C++ source and header files. " Switch between C++ source and header files.
noremap <leader>v :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,<CR> noremap <leader>v :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,<CR>
"noremap <leader>vv :e %:p:s,.h$,.X123X,:s,.c$,.h,:s,.X123X$,.c,<CR> noremap <leader>vv :e %:p:s,.h$,.X123X,:s,.c$,.h,:s,.X123X$,.c,<CR>
"noremap <leader>vvv :e %:p:s,.h$,.X123X,:s,.cc$,.h,:s,.X123X$,.cc,<CR> "noremap <leader>vvv :e %:p:s,.h$,.X123X,:s,.cc$,.h,:s,.X123X$,.cc,<CR>
" Replace all instances of the highlighted text with whatever you enter. " Replace all instances of the highlighted text with whatever you enter.