Browse code

documentation and garbage collection

dewomser authored on30/10/2018 21:40:25
Showing1 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 #!/bin/bash
2
-## This Shellscript downloads all fresh videos from afirefox favorite folder. ##
2
+## This Shellscript downloads all fresh videos from a firefox bookmark folder. ##
3 3
 
4
-## update your youtube-dl ##
4
+## Update your youtube-dl ! ##
5 5
 # "youtube-dl -U" 
6 6
 ## or 
7 7
 # pip install --upgrade youtube-dl
... ...
@@ -9,20 +9,20 @@
9 9
 
10 10
 ## Variables ##
11 11
 
12
-## save all your Youtube playlists in $favdir ##
12
+## Save all your Youtube playlists in favdir ##
13 13
 favdir="bestof"
14
-## firefox running ?
14
+## Firefox running ?
15 15
 ffon=0; ps -ef|grep firefox|grep -v grep && ffon=1
16 16
 ## Download folder ##
17 17
 dl_folder="/home/foo/Downloads/youtube-dl/"
18 18
 ## Date= yesterday ##
19 19
 datum=$(date -d "1 day ago" '+%Y%m%d')
20
-## Videos per day on each playlist##
20
+## Max. videos / datum to each playlist ##
21 21
 perday=4
22 22
 ## if aria2 is installed example : ##
23 23
 # aria2='--external-downloader aria2c  --external-downloader-args "-j 8 -s 8 -x 8 -k 5M"'
24 24
 aria2=''
25
-## load from database or array
25
+## load from "database" or "array".
26 26
 loadfrom=database
27 27
 ## firefox database
28 28
 sqltdata=places.sqlite
... ...
@@ -37,7 +37,7 @@ cp $sqltdata places2.sqlite
37 37
 sqltdata=places2.sqlite
38 38
 fi
39 39
 
40
-## only edit dbarray content if you want to use it
40
+## only edit dbarray test-content if you want to use it
41 41
 
42 42
 if [ $loadfrom == array ]
43 43
 then
... ...
@@ -51,8 +51,8 @@ then
51 51
 ##
52 52
  
53 53
 else
54
- ## This line puts FF favourites from sqlite3 to an array ##
55
- ## Only if 2.) Next line edit "places" to "places2"
54
+ ## This line puts FF bookmarks from sqlite3 to an array ##
55
+
56 56
  dbarray=( $(sqlite3 -list $sqltdata 'select url from moz_places where id in (select fk from moz_bookmarks where parent in ( select "id" from moz_bookmarks where title == "'$favdir'"))'; ))
57 57
 fi
58 58
 cd  $dl_folder || exit