Created
October 10, 2020 13:17
-
-
Save dewomser/01f41e33c1102ce808b0079fc860e54b to your computer and use it in GitHub Desktop.
Check for fresh videos in folder. A Bash script uses KDE notify-send
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
#!/bin/bash | |
# This shows new Viedoclips. Script is tested with Kubuntu 20.04 and uses notify-send Popup-Window | |
# edit dl-folder for your needs | |
#It does not fail if nothing pops up. there was propably no fresh Video in the last 4 hours. | |
#If you want to be remembered regulary there is this line for your user crontab : | |
#0 * * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /home/foo/bin/yt-dl-send-notify.sh | |
dl_folder=~/Downloads/videos/ | |
f=$(find $dl_folder -newermt '4 hours ago' -type f -regex '.*\.\(mkv\|mp4\|wmv\|flv\|webm\|mov\)') | |
if [ -z "$f" ] | |
then exit | |
else | |
folder1="$(echo $dl_folder|sed "s/\//\\\\\//g")" | |
sedarg="sed s/$folder1/\n/g" | |
f1=$(echo "$f"|$sedarg) | |
notify-send --icon=video-x-generic "$f1": "Open folder: <a href='$dl_folder'>clips</a>" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This Video checker is part of my FF-Youtube-dl Project
https://github.com/dewomser/FF-auto-youtube-download-