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