Browse code

aria2 disabled

dewomser authored on23/05/2018 19:08:52
Showing1 changed files
... ...
@@ -23,7 +23,6 @@ perday=4
23 23
 aria2=''
24 24
 
25 25
 ## from Firefox bookmarks ##
26
-## switch to the default firefox folder with sqlite databases. ##
27 26
 ## change *default* if you have other profiles than default. ##
28 27
 ## comment if you load from array ##
29 28
 cd ~/.mozilla/firefox/*default* || exit
... ...
@@ -46,7 +45,7 @@ cd  $dl_folder || exit
46 45
 ## let youtube-dl do the work  and download brandnew videos##
47 46
 # 
48 47
 for i in "${dbarray[@]}"; do
49
-youtube-dl "$aria2" --dateafter "$datum" --playlist-end "$perday" --max-downloads "$perday" "$i"
48
+youtube-dl $aria2 --dateafter "$datum" --playlist-end "$perday" --max-downloads "$perday" "$i"
50 49
 # echo $i
51 50
 done
52 51
 
Browse code

small things getting better

dewomser authored on22/05/2018 08:52:55
Showing1 changed files
... ...
@@ -1,50 +1,47 @@
1 1
 #!/bin/bash
2
-#
3
-# This Shellscript downloads all fresh videos from afirefox favorite folder.
4
-# sqlite3 and youtube-dl must  be installed
5
-# 
6
-#update youtube-dl
7
-# "youtube-dl -U" or "pip youtube-dl install"
2
+## This Shellscript downloads all fresh videos from afirefox favorite folder. ##
3
+
4
+## update youtube-dl ##
5
+## "youtube-dl -U" or "pip youtube-dl install" ##
8 6
 # pip install --upgrade youtube-dl
9 7
 # sleep 5
10 8
 
11
-# Variables #
12
-##firefox manages bookmarks from database. ##
13
-##save all your Youtube playlists in $favdir##
9
+## Variables ##
10
+## Firefox manages bookmarks from database. ##
11
+# #save all your Youtube playlists in $favdir ##
14 12
 favdir="bestof"
15 13
 echo $favdir
16
-##Download folder##
14
+## Download folder ##
17 15
 dl_folder="/home/foo/Downloads/youtube-dl/"
18 16
 echo  $dl_folder
19
-##Date= yesterday##
17
+## Date= yesterday ##
20 18
 datum=$(date -d "1 day ago" '+%Y%m%d')
21 19
 ## Videos per day in each playlist##
22 20
 perday=4
23
-##if aria2 is installed example :##
24
-#aria2='--external-downloader aria2c  --external-downloader-args "-j 8 -s 8 -x 8 -k 5M"'
21
+## if aria2 is installed example : ##
22
+# aria2='--external-downloader aria2c  --external-downloader-args "-j 8 -s 8 -x 8 -k 5M"'
25 23
 aria2=''
26 24
 
27
-## from Firefox bookmarks##
28
-## switch to the default firefox folder with sqlite databases.##
29
-## change *default* if you have other profiles than default.##
25
+## from Firefox bookmarks ##
26
+## switch to the default firefox folder with sqlite databases. ##
27
+## change *default* if you have other profiles than default. ##
28
+## comment if you load from array ##
30 29
 cd ~/.mozilla/firefox/*default* || exit
31 30
 
32
-##uncomment if you  load from an array##
33
-##No Firefox no variables needed##
34
-#dl_folder="~/Downloads"
35
-#perday=4
36
-#dbarray=(
37
-#"https://www.youtube.com/user/example-foo"
38
-#"https://www.youtube.com/channel/example-bar/videos?sort=dd&shelf_id=0&view=0"
39
-#)
31
+## uncomment if you  load from an array ##
32
+## No Firefox no variables needed ##
33
+# dl_folder="~/Downloads"
34
+# perday=4
35
+# dbarray=(
36
+# "https://www.youtube.com/user/example-foo"
37
+# "https://www.youtube.com/channel/example-bar/videos?sort=dd&shelf_id=0&view=0"
38
+# )
40 39
 
41
-##comment this if you load from array##
42
-##firefox manages bookmarks from database.## 
43
-##Firefox  bookmarks needs a folder $favdir.##
44
-##save all your Youtube playlists in $favdir##
40
+## comment this if you load from array ##
41
+## this line puts FF favourites from sqlite3 to an array ##
45 42
 dbarray=( $(sqlite3 -list places.sqlite 'select url from moz_places where id in (select fk from moz_bookmarks where parent in ( select "id" from moz_bookmarks where title == "'$favdir'"))'; ))
46 43
 
47
-##this  must not be commented##
44
+## this  must not be commented ##
48 45
 cd  $dl_folder || exit
49 46
 ## let youtube-dl do the work  and download brandnew videos##
50 47
 # 
... ...
@@ -53,4 +50,5 @@ youtube-dl "$aria2" --dateafter "$datum" --playlist-end "$perday" --max-download
53 50
 # echo $i
54 51
 done
55 52
 
53
+## optional ##
56 54
 #dolphin $dl_folder
Browse code

Minor Improvements, extern Downloader aria2 is an option, script is shellchecked, comment = ## example = #

dewomser authored on22/05/2018 08:27:47
Showing1 changed files
... ...
@@ -9,27 +9,28 @@
9 9
 # sleep 5
10 10
 
11 11
 # Variables #
12
-#firefox manages bookmarks from database. 
13
-#save all your Youtube playlists in $favdir
12
+##firefox manages bookmarks from database. ##
13
+##save all your Youtube playlists in $favdir##
14 14
 favdir="bestof"
15 15
 echo $favdir
16
-#Download folder
16
+##Download folder##
17 17
 dl_folder="/home/foo/Downloads/youtube-dl/"
18 18
 echo  $dl_folder
19
-#Date= yesterday
19
+##Date= yesterday##
20 20
 datum=$(date -d "1 day ago" '+%Y%m%d')
21
-# Videos per day in each playlist
21
+## Videos per day in each playlist##
22 22
 perday=4
23
-#if aria2 is installed example :--external-downloader aria2c  --external-downloader-args "-j 8 -s 8 -x 8 -k 5M"
23
+##if aria2 is installed example :##
24
+#aria2='--external-downloader aria2c  --external-downloader-args "-j 8 -s 8 -x 8 -k 5M"'
24 25
 aria2=''
25 26
 
26
-# from Firefox bookmarks
27
-# switch to the default firefox folder with sqlite databases.
28
-# change *default* if you have other profiles than default.
27
+## from Firefox bookmarks##
28
+## switch to the default firefox folder with sqlite databases.##
29
+## change *default* if you have other profiles than default.##
29 30
 cd ~/.mozilla/firefox/*default* || exit
30 31
 
31
-# uncomment if you  load from an array
32
-# No Firefox no variables needed 
32
+##uncomment if you  load from an array##
33
+##No Firefox no variables needed##
33 34
 #dl_folder="~/Downloads"
34 35
 #perday=4
35 36
 #dbarray=(
... ...
@@ -37,15 +38,15 @@ cd ~/.mozilla/firefox/*default* || exit
37 38
 #"https://www.youtube.com/channel/example-bar/videos?sort=dd&shelf_id=0&view=0"
38 39
 #)
39 40
 
40
-#comment this if you load from array
41
-#firefox manages bookmarks from database. 
42
-#Firefox  bookmarks needs a folder $favdir.
43
-#save all your Youtube playlists in $favdir
41
+##comment this if you load from array##
42
+##firefox manages bookmarks from database.## 
43
+##Firefox  bookmarks needs a folder $favdir.##
44
+##save all your Youtube playlists in $favdir##
44 45
 dbarray=( $(sqlite3 -list places.sqlite 'select url from moz_places where id in (select fk from moz_bookmarks where parent in ( select "id" from moz_bookmarks where title == "'$favdir'"))'; ))
45 46
 
46
-#this  must not be commented
47
+##this  must not be commented##
47 48
 cd  $dl_folder || exit
48
-# let youtube-dl do the work  and download brandnew videos
49
+## let youtube-dl do the work  and download brandnew videos##
49 50
 # 
50 51
 for i in "${dbarray[@]}"; do
51 52
 youtube-dl "$aria2" --dateafter "$datum" --playlist-end "$perday" --max-downloads "$perday" "$i"
Browse code

minor improvements, aria2 extern Download tested , script is shellchecked now

dewomser authored on22/05/2018 08:00:10
Showing1 changed files
... ...
@@ -11,7 +11,7 @@
11 11
 # Variables #
12 12
 #firefox manages bookmarks from database. 
13 13
 #save all your Youtube playlists in $favdir
14
-favdir="gestof"
14
+favdir="bestof"
15 15
 echo $favdir
16 16
 #Download folder
17 17
 dl_folder="/home/foo/Downloads/youtube-dl/"
... ...
@@ -20,6 +20,8 @@ echo  $dl_folder
20 20
 datum=$(date -d "1 day ago" '+%Y%m%d')
21 21
 # Videos per day in each playlist
22 22
 perday=4
23
+#if aria2 is installed example :--external-downloader aria2c  --external-downloader-args "-j 8 -s 8 -x 8 -k 5M"
24
+aria2=''
23 25
 
24 26
 # from Firefox bookmarks
25 27
 # switch to the default firefox folder with sqlite databases.
... ...
@@ -46,7 +48,7 @@ cd  $dl_folder || exit
46 48
 # let youtube-dl do the work  and download brandnew videos
47 49
 # 
48 50
 for i in "${dbarray[@]}"; do
49
-youtube-dl --external-downloader aria2c  --external-downloader-args "-j 8 -s 8 -x 8 -k 5M" --dateafter "$datum" --playlist-end "$perday" --max-downloads "$perday" "$i"
51
+youtube-dl "$aria2" --dateafter "$datum" --playlist-end "$perday" --max-downloads "$perday" "$i"
50 52
 # echo $i
51 53
 done
52 54
 
Browse code

small improvements, aria2c build in , shellchecked

dewomser authored on22/05/2018 07:41:49
Showing1 changed files
... ...
@@ -1,34 +1,53 @@
1
-#! /bin/bash
2
-#This Bash-script should be executed every day (crontab -e) 
1
+#!/bin/bash
2
+#
3
+# This Shellscript downloads all fresh videos from afirefox favorite folder.
4
+# sqlite3 and youtube-dl must  be installed
5
+# 
6
+#update youtube-dl
7
+# "youtube-dl -U" or "pip youtube-dl install"
8
+# pip install --upgrade youtube-dl
9
+# sleep 5
3 10
 
4
-update youtube-dl
5
-youtube-dl -U
6
-sleep 5
7
-# fav dir
8
-# put in your favorite path
9
-favdir="auto-yt"
10
-#echo $favdir
11
+# Variables #
12
+#firefox manages bookmarks from database. 
13
+#save all your Youtube playlists in $favdir
14
+favdir="gestof"
15
+echo $favdir
16
+#Download folder
17
+dl_folder="/home/foo/Downloads/youtube-dl/"
18
+echo  $dl_folder
11 19
 #Date= yesterday
12 20
 datum=$(date -d "1 day ago" '+%Y%m%d')
21
+# Videos per day in each playlist
22
+perday=4
23
+
24
+# from Firefox bookmarks
25
+# switch to the default firefox folder with sqlite databases.
26
+# change *default* if you have other profiles than default.
27
+cd ~/.mozilla/firefox/*default* || exit
13 28
 
14
-# from array. No Firefox needed
29
+# uncomment if you  load from an array
30
+# No Firefox no variables needed 
31
+#dl_folder="~/Downloads"
32
+#perday=4
15 33
 #dbarray=(
16 34
 #"https://www.youtube.com/user/example-foo"
17 35
 #"https://www.youtube.com/channel/example-bar/videos?sort=dd&shelf_id=0&view=0"
18 36
 #)
19 37
 
20
-# from Firefox bookmarks
21
-#switch to the default firefox folder with sqlite databases.
22
-#change *default* if you have other profiles than default.
23
-cd ~/.mozilla/firefox/*default*
24
-
38
+#comment this if you load from array
25 39
 #firefox manages bookmarks from database. 
26
-#Firefox  bookmarks needs a folder auto-yt.
27
-#save all your Youtube playlists in auto-yt
40
+#Firefox  bookmarks needs a folder $favdir.
41
+#save all your Youtube playlists in $favdir
28 42
 dbarray=( $(sqlite3 -list places.sqlite 'select url from moz_places where id in (select fk from moz_bookmarks where parent in ( select "id" from moz_bookmarks where title == "'$favdir'"))'; ))
29
-#switch  to your youtube download folder
30
-cd ~/Downloads
31
-#let youtube-dl do the work  and download brandnew videos
32
-for i in ${dbarray[@]}; do
33
-youtube-dl --dateafter $datum --playlist-end 4 --max-downloads 2 $i
43
+
44
+#this  must not be commented
45
+cd  $dl_folder || exit
46
+# let youtube-dl do the work  and download brandnew videos
47
+# 
48
+for i in "${dbarray[@]}"; do
49
+youtube-dl --external-downloader aria2c  --external-downloader-args "-j 8 -s 8 -x 8 -k 5M" --dateafter "$datum" --playlist-end "$perday" --max-downloads "$perday" "$i"
50
+# echo $i
34 51
 done
52
+
53
+#dolphin $dl_folder
Browse code

test Umgebung entfernt

Stefan authored on22/10/2017 15:55:59
Showing1 changed files
... ...
@@ -1,13 +1,13 @@
1 1
 #! /bin/bash
2 2
 #This Bash-script should be executed every day (crontab -e) 
3 3
 
4
-#update youtube-dl
5
-#youtube-dl -U
6
-#sleep 5
4
+update youtube-dl
5
+youtube-dl -U
6
+sleep 5
7 7
 # fav dir
8 8
 # put in your favorite path
9 9
 favdir="auto-yt"
10
-echo $favdir
10
+#echo $favdir
11 11
 #Date= yesterday
12 12
 datum=$(date -d "1 day ago" '+%Y%m%d')
13 13
 
... ...
@@ -27,7 +27,6 @@ cd ~/.mozilla/firefox/*default*
27 27
 #save all your Youtube playlists in auto-yt
28 28
 dbarray=( $(sqlite3 -list places.sqlite 'select url from moz_places where id in (select fk from moz_bookmarks where parent in ( select "id" from moz_bookmarks where title == "'$favdir'"))'; ))
29 29
 #switch  to your youtube download folder
30
-echo $favdir
31 30
 cd ~/Downloads
32 31
 #let youtube-dl do the work  and download brandnew videos
33 32
 for i in ${dbarray[@]}; do
Browse code

Favoriten als Variable

Der Pfad muß zu Beginn vom User als Variable gesetzt werden

Stefan authored on22/10/2017 15:47:31
Showing1 changed files
1 1
old mode 100644
2 2
new mode 100755
... ...
@@ -2,9 +2,12 @@
2 2
 #This Bash-script should be executed every day (crontab -e) 
3 3
 
4 4
 #update youtube-dl
5
-youtube-dl -U
6
-sleep 5
7
-
5
+#youtube-dl -U
6
+#sleep 5
7
+# fav dir
8
+# put in your favorite path
9
+favdir="auto-yt"
10
+echo $favdir
8 11
 #Date= yesterday
9 12
 datum=$(date -d "1 day ago" '+%Y%m%d')
10 13
 
... ...
@@ -22,8 +25,9 @@ cd ~/.mozilla/firefox/*default*
22 25
 #firefox manages bookmarks from database. 
23 26
 #Firefox  bookmarks needs a folder auto-yt.
24 27
 #save all your Youtube playlists in auto-yt
25
-dbarray=( $(sqlite3 -list places.sqlite 'select url from moz_places where id in (select fk from moz_bookmarks where parent in ( select "id" from moz_bookmarks where title  == "auto-yt"))'; ))
28
+dbarray=( $(sqlite3 -list places.sqlite 'select url from moz_places where id in (select fk from moz_bookmarks where parent in ( select "id" from moz_bookmarks where title == "'$favdir'"))'; ))
26 29
 #switch  to your youtube download folder
30
+echo $favdir
27 31
 cd ~/Downloads
28 32
 #let youtube-dl do the work  and download brandnew videos
29 33
 for i in ${dbarray[@]}; do
Browse code

There is an option only array

dewomser authored on31/01/2017 16:40:42
Showing1 changed files
... ...
@@ -1,14 +1,30 @@
1 1
 #! /bin/bash
2
+#This Bash-script should be executed every day (crontab -e) 
2 3
 
3
-#should be executed every day (crontab -e) 
4
+#update youtube-dl
5
+youtube-dl -U
6
+sleep 5
7
+
8
+#Date= yesterday
4 9
 datum=$(date -d "1 day ago" '+%Y%m%d')
5
-#switch to the default firefox folder with sqlite databases
10
+
11
+# from array. No Firefox needed
12
+#dbarray=(
13
+#"https://www.youtube.com/user/example-foo"
14
+#"https://www.youtube.com/channel/example-bar/videos?sort=dd&shelf_id=0&view=0"
15
+#)
16
+
17
+# from Firefox bookmarks
18
+#switch to the default firefox folder with sqlite databases.
19
+#change *default* if you have other profiles than default.
6 20
 cd ~/.mozilla/firefox/*default*
7
-#firefox manages bookmarks in a database. Firefox  bookmarks needs a folder auto-yt.
8
-#save  playlists in this directory
21
+
22
+#firefox manages bookmarks from database. 
23
+#Firefox  bookmarks needs a folder auto-yt.
24
+#save all your Youtube playlists in auto-yt
9 25
 dbarray=( $(sqlite3 -list places.sqlite 'select url from moz_places where id in (select fk from moz_bookmarks where parent in ( select "id" from moz_bookmarks where title  == "auto-yt"))'; ))
10
-#switch  home
11
-cd
26
+#switch  to your youtube download folder
27
+cd ~/Downloads
12 28
 #let youtube-dl do the work  and download brandnew videos
13 29
 for i in ${dbarray[@]}; do
14 30
 youtube-dl --dateafter $datum --playlist-end 4 --max-downloads 2 $i
Browse code

Update youtube-dl.sh

Stefan Höhn authored on26/12/2016 00:07:46 • GitHub committed on26/12/2016 00:07:46
Showing1 changed files
... ...
@@ -2,9 +2,9 @@
2 2
 
3 3
 #should be executed every day (crontab -e) 
4 4
 datum=$(date -d "1 day ago" '+%Y%m%d')
5
-#switch to the default firefox dir with sqlite databases
5
+#switch to the default firefox folder with sqlite databases
6 6
 cd ~/.mozilla/firefox/*default*
7
-# firefox manage bookmarks in a database. Firefox  bookmarks needs a directory auto-yt.
7
+#firefox manages bookmarks in a database. Firefox  bookmarks needs a folder auto-yt.
8 8
 #save  playlists in this directory
9 9
 dbarray=( $(sqlite3 -list places.sqlite 'select url from moz_places where id in (select fk from moz_bookmarks where parent in ( select "id" from moz_bookmarks where title  == "auto-yt"))'; ))
10 10
 #switch  home
Browse code

Create youtube-dl.sh

Stefan Höhn authored on25/12/2016 23:48:01 • GitHub committed on25/12/2016 23:48:01
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+#! /bin/bash
2
+
3
+#should be executed every day (crontab -e) 
4
+datum=$(date -d "1 day ago" '+%Y%m%d')
5
+#switch to the default firefox dir with sqlite databases
6
+cd ~/.mozilla/firefox/*default*
7
+# firefox manage bookmarks in a database. Firefox  bookmarks needs a directory auto-yt.
8
+#save  playlists in this directory
9
+dbarray=( $(sqlite3 -list places.sqlite 'select url from moz_places where id in (select fk from moz_bookmarks where parent in ( select "id" from moz_bookmarks where title  == "auto-yt"))'; ))
10
+#switch  home
11
+cd
12
+#let youtube-dl do the work  and download brandnew videos
13
+for i in ${dbarray[@]}; do
14
+youtube-dl --dateafter $datum --playlist-end 4 --max-downloads 2 $i
15
+done