summaryrefslogtreecommitdiff
path: root/bin/extra/igdl
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-19 10:30:03 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-19 10:30:03 +0200
commitff6c38d3364165a7bae431888a87aab1e53a80b9 (patch)
treec0ac13cdbf388d59193522eb8775788a6fae3e81 /bin/extra/igdl
parent4bf952169c5d94044a6dd3c868c990716d22c58b (diff)
parent05e1216b45340702f82a4946002015a05cebe9b1 (diff)
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'bin/extra/igdl')
-rwxr-xr-xbin/extra/igdl21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/extra/igdl b/bin/extra/igdl
new file mode 100755
index 0000000..1973187
--- /dev/null
+++ b/bin/extra/igdl
@@ -0,0 +1,21 @@
+#!/bin/sh
+lock="/tmp/igdl.lock"
+
+if [ -f "$lock" ]
+then
+ herbe "already downloading."
+ exit 1
+fi
+
+
+url="$(clipo)"
+out="/tmp/igdl.mp4"
+
+touch "$lock"
+herbe "igdl" "downloading: $url" &
+yt-dlp "$url" -o "$out" || rm "$lock"
+
+printf '%s' "$out" | clipp
+herbe "igdl" "copied path."
+
+rm "$lock"