summaryrefslogtreecommitdiff
path: root/bin/extra/igdl
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-18 16:12:01 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-18 16:12:01 +0200
commit05e1216b45340702f82a4946002015a05cebe9b1 (patch)
tree316793ccd39f65e758cdf6ab6957cf677bc8a783 /bin/extra/igdl
parentb0cf79d522a609eda250629386eb45c2978ef2d8 (diff)
checkpoint
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"