Browse code

small things getting better

dewomser authored on22/05/2018 08:52:55
Showing2 changed files

... ...
@@ -1,10 +1,12 @@
1
+
2
+
1 3
 # FF-auto-youtube-download-
2
-##Download favourite Videos from an array or Firefox-folder
3
-No need to login
4
-The script downloads only fresh Videos to disk.
4
+## Download favourite Videos from an array or Firefox-folder
5 5
 
6
-1.option array : only shell and youtube-dl is needed
7
-2.option firefox-folder : shell, firefox, sqlite3, (aria2)
6
+No need to login
8 7
 
8
+The script downloads only fresh Videos to disk.
9 9
 
10
+1. option array : only shell and youtube-dl is needed
10 11
 
12
+2. option firefox-folder : shell, firefox, sqlite3, (aria2)
... ...
@@ -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