-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash_aliases.ytdl
65 lines (62 loc) · 3 KB
/
.bash_aliases.ytdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# vim: ft=bash noet:
! declare 2>&1 | grep -wq ^colors= && [ $BASH_VERSINFO -ge 4 ] && source $initDir/.colors
test "$debug" -gt 0 && echo "=> Running $bold${colors[blue]}$(basename ${BASH_SOURCE[0]})$normal ..."
#youtube_dl="eval LANG=C.UTF-8 command youtube-dl" # i.e https://unix.stackexchange.com/questions/505733/ # eval A EVITER
NCC_Channel=https://www.youtube.com/user/NewCreationChurch
NCC_Live=$NCC_Channel/live
NCC_Videos=$NCC_Channel/videos?sort=dd
JP_Channel=https://www.youtube.com/c/JosephPrinceOnline
JP_Live=$JP_Channel/live
JP_Videos=$JP_Channel/videos?sort=dd
JP_USA_Channel=https://www.youtube.com/c/JosephPrinceMinistriesUSA
JP_USA_Live=$JP_USA_Channel/live
JP_USA_Videos=$JP_USA_Channel/videos?sort=dd
# youtube-dl
ytdlURL=https://github.com/ytdl-org/youtube-dl
ytdlGitURL=git+https://github.com/ytdl-org/youtube-dl
ytdlIssues=$ytdlURL/issues
ytdlReleases=$ytdlURL/releases
ytdlLatestRelease=$ytdlReleases/latest
# yt-dlp
ytdlpURL=https://github.com/yt-dlp/yt-dlp
ytdlpGitURL=git+https://github.com/yt-dlp/yt-dlp
ytdlpIssues=$ytdlpURL/issues
ytdlpReleases=$ytdlpURL/releases
ytdlpLatestRelease=$ytdlpReleases/latest
if [ -n "$SSH_CONNECTION" ] && type -P screen >/dev/null 2>&1;then
alias recordYTLive="screen -L timeout -s SIGINT 150m getRestrictedFilenamesFORMAT.sh"
else
alias recordYTLive="timeout -s SIGINT 150m getRestrictedFilenamesFORMAT.sh"
fi
alias recordJPLive360p="recordYTLive 93 $JP_Live"
alias recordNCCLive360p="recordYTLive 93 $NCC_Live"
alias recordJPLive480p="recordYTLive 94 $JP_Live"
alias recordNCCLive480p="recordYTLive 94 $NCC_Live"
alias recordNCCLive=recordNCCLive480p
alias recordJPLive=recordJPLive360p
alias youtube-dl="LANG=C.UTF-8 command youtube-dl"
alias yt-dl="LANG=C.UTF-8 command youtube-dl"
ytdlnoconfig="youtube-dl --ignore-config"
alias ytdlnoconfig="$ytdlnoconfig"
ytdlpnoconfig="yt-dlp --ignore-config"
alias ytdlpnoconfig="$ytdlpnoconfig"
alias ytdlVersion="\youtube-dl --version"
alias ytdlpVersion="\yt-dlp --version"
alias ytdlGetFileName="\youtube-dl --get-filename"
alias ytdlpGetFileName="\yt-dlp --get-filename"
alias ytdlGetVideoID="\youtube-dl --get-id"
alias ytdlGetFormatID="\youtube-dl --get-filename -o '%(format_id)s' -f"
alias ytdlLatestRelease='\git ls-remote --tags --refs $ytdlURL | awk -F/ "{print\$NF}" | sort -rV | head -1'
alias ytdlpLatestRelease='\git ls-remote --tags --refs $ytdlpURL | awk -F/ "{print\$NF}" | sort -rV | head -1'
alias ytdlOpenIssues="open $ytdlURL/issues"
alias ytdlpOpenIssues="open $ytdlpURL/issues"
alias ytdlOpenReleases="open $ytdlURL/releases"
alias ytdlpOpenReleases="open $ytdlpURL/releases"
alias ytdlOpenLatestRelease="open $ytdlURL/releases/latest"
alias ytdlpOpenLatestRelease="open $ytdlpURL/releases/latest"
alias ytdlUpdateFromGit="ytdlUpdate $ytdlURL"
alias ytdlpUpdateFromGit="ytdlpUpdate $ytdlpURL"
alias ytdlUpdateFromGitLatestMerge="$sudo pip install -U $ytdlGitURL"
alias ytdlpUpdateFromGitLatestMerge="$sudo pip install -U $ytdlpGitURL"
set +x
test "$debug" -gt 0 && echo "=> END of $bold${colors[blue]}$(basename ${BASH_SOURCE[0]})$normal"