Created
February 26, 2020 10:56
-
-
Save MoatazAbdAlmageed/b214f3facba24e194db1f44376a30bb1 to your computer and use it in GitHub Desktop.
bash alias
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
makeapp(){ | |
mkdir assets && touch README.md index.html scripts.js styles.css && git init && npm init -y | |
} | |
mkcourse(){ | |
mkdir 00.completed 01.talks [Arabic] | |
echo "source ~/bash/more/youtube.sh" > download.sh | |
gedit download.sh | |
echo "source ~/bash/more/youtube.sh" > \[Arabic\]/download.sh | |
x download.sh | |
} | |
playlist(){ | |
#example playlist ttps://www.youtube.com/playlist?list=PLgtqMzuQ7vio2xFEDCf4ouftW1a95VXbF 1 (start) 18 (quality) | |
#todo set counter each video increase counter | |
#then in fail start from this counter | |
#if no counter start ptom passing start num | |
# Download YouTube playlist videos in separate directory indexed by video order in a playlist | |
while ! youtube-dl $1 -o '%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' -f '[height<=480]' --playlist-start ${2-1} --continue --socket-timeout 5 ; do echo DISCONNECTED; sleep 5; done | |
} | |
v(){ | |
#youtube-dl https://www.youtube.com/watch?v=$1 | |
while ! youtube-dl -o '%(uploader)s/%(title)s.%(ext)s' $1 -f 'bestvideo[height<=720]+bestaudio/best[height=720]' --continue --socket-timeout 5; do echo DISCONNECTED; sleep 5; done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment