summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLM-LCL <hello@exaltedelite.club>2023-08-31 01:01:57 +0200
committerLM-LCL <hello@exaltedelite.club>2023-09-01 16:14:09 +0200
commit9aa290b9667832c8ae41ed8bc36e57da7a74b9c2 (patch)
tree532a98d4561a85952543c609e4ff7c5c45601b5a /lib
parentfe92c7ac827b18673e1fa89dacfca370dcfd313d (diff)
complete script revamp
Diffstat (limited to 'lib')
-rwxr-xr-xlib/action/Clip23
-rwxr-xr-xlib/action/Clipboard12
-rwxr-xr-xlib/action/Download10
-rwxr-xr-xlib/action/Open6
-rwxr-xr-xlib/action/Play11
-rwxr-xr-xlib/action/Record7
-rwxr-xr-xlib/action/Torrent6
-rwxr-xr-xlib/action/aDownload13
-rwxr-xr-xlib/search/1337x67
-rwxr-xr-xlib/search/Odysee10
-rwxr-xr-xlib/search/PeerTube10
-rwxr-xr-xlib/search/Wallhaven8
-rwxr-xr-xlib/search/YouTube19
13 files changed, 0 insertions, 202 deletions
diff --git a/lib/action/Clip b/lib/action/Clip
deleted file mode 100755
index d98cf0e..0000000
--- a/lib/action/Clip
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/bash
-
-source ./util/verify/cbd-https
-source ./util/menu/deasy-core
-source ./util/dpath
-
-url="$(is_https_url_cbd "$1")"
-
-from="$(deasy_core 'From (00:00/n)')"
-[ -z "$from" ] && exit 0
-
-to="$(deasy_core 'To (00:00/n)')"
-[ -z "$to" ] && exit 0
-
-filename="$(deasy_core 'Filename')"
-[ -z "$filename" ] && exit 0
-
-ffmpeg -n \
- -ss "$from" \
- -to "$to" \
- -i "$(yt-dlp -f b --get-url "$url")" \
- "$DPATH/$filename.mp4"
-
diff --git a/lib/action/Clipboard b/lib/action/Clipboard
deleted file mode 100755
index b8e42e1..0000000
--- a/lib/action/Clipboard
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/bash
-
-source ./util/verify/cbd-core
-
-[ -z "$1" ] && url="$(get_cbd)" \
- && [ -z "$url" ] \
- && exit 0 \
- || url="$1"
-
-printf "$url" | xclip -sel c
-printf "$url" | xclip
-
diff --git a/lib/action/Download b/lib/action/Download
deleted file mode 100755
index 01e8eb5..0000000
--- a/lib/action/Download
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /bin/bash
-
-source ./util/verify/cbd-https
-source ./util/dpath
-
-yt-dlp -f 'bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' \
- -o "$DPATH/%(title)s.%(ext)s" \
- --embed-chapters \
- "$(is_https_url_cbd "$1")"
-
diff --git a/lib/action/Open b/lib/action/Open
deleted file mode 100755
index 76f1246..0000000
--- a/lib/action/Open
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/bash
-
-source ./util/verify/cbd-https
-
-xdg-open "$(is_https_url_cbd "$1")"
-
diff --git a/lib/action/Play b/lib/action/Play
deleted file mode 100755
index fa56bac..0000000
--- a/lib/action/Play
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/bash
-
-source ./util/verify/cbd-https
-
-url="$(is_https_url_cbd "$1")"
-
-[[ "$url" = *"&list="* ]] && playlist="$(echo "$url" | awk -F '&list=' '{print $2}')" \
- && url="https://www.youtube.com/playlist?list=$playlist"
-
-mpv "$url"
-
diff --git a/lib/action/Record b/lib/action/Record
deleted file mode 100755
index ac6c182..0000000
--- a/lib/action/Record
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /bin/bash
-
-source ./util/verify/cbd-https
-source ./util/dpath
-
-mpv --stream-record="$DPATH/$(date +'%Y-%m-%d—%T.mkv')" "$(is_https_url_cbd "$1")"
-
diff --git a/lib/action/Torrent b/lib/action/Torrent
deleted file mode 100755
index 4309da8..0000000
--- a/lib/action/Torrent
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/bash
-
-source ./util/verify/cbd-magnet
-
-qbittorrent "$(is_magnet_url_cbd "$1")"
-
diff --git a/lib/action/aDownload b/lib/action/aDownload
deleted file mode 100755
index 56fe212..0000000
--- a/lib/action/aDownload
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/bash
-
-source ./util/verify/cbd-https
-source ./util/dpath
-
-yt-dlp -f 'bestaudio/best' \
- -o "$DPATH/%(title)s.%(ext)s" \
- --embed-thumbnail \
- --extract-audio \
- --audio-format mp3 \
- --embed-chapters \
- "$(is_https_url_cbd "$1")"
-
diff --git a/lib/search/1337x b/lib/search/1337x
deleted file mode 100755
index 7464fcd..0000000
--- a/lib/search/1337x
+++ /dev/null
@@ -1,67 +0,0 @@
-#! /bin/bash
-
-source ./util/menu/deasy
-source ./util/notify
-
-CACHEDIR="$HOME/.cache/notflix-mod"
-[ -d "$CACHEDIR" ] || mkdir -p "$CACHEDIR"
-
-BASEURL='https://1337x.to'
-
-query="$(echo $(deasy "$1" 'Search 1337x') | sed 's/ /+/g')"
-curl -s "$BASEURL/search/$query/1/" > "$CACHEDIR/tmp.html"
-
-# Titles
-grep -o '<a href="/torrent/.*</a>' "$CACHEDIR/tmp.html" \
- | sed 's/<[^>]*>//g' > "$CACHEDIR/titles.bw"
-
-# Void Check
-count=$(wc -l "$CACHEDIR/titles.bw" | awk '{print $1}')
-[ $count -lt 1 ] && notify 'Empty Response' && exit 0
-
-# Seeders & Leechers
-grep -o '<td class="coll-2 seeds.*</td>\|<td class="coll-3 leeches.*</td>' "$CACHEDIR/tmp.html" \
- | sed 's/<[^>]*>//g' \
- | sed 'N;s/\n/ /' > "$CACHEDIR/seedleech.bw"
-
-# Size
-grep -o '<td class="coll-4 size.*</td>' "$CACHEDIR/tmp.html" \
- | sed 's/<span class="seeds">.*<\/span>//g' \
- | sed -e 's/<[^>]*>//g' > "$CACHEDIR/size.bw"
-
-# Links
-grep -E '/torrent/' "$CACHEDIR/tmp.html" \
- | sed -E 's#.*(/torrent/.*)/">.*/#\1#' \
- | sed 's/td>//g' > "$CACHEDIR/links.bw"
-
-# Cleanup
-sed 's/\./ /g; s/\-/ /g' "$CACHEDIR/titles.bw" \
- | sed 's/[^A-Za-z0-9 ]//g' \
- | tr -s ' ' > "$CACHEDIR/tmp" && mv "$CACHEDIR/tmp" "$CACHEDIR/titles.bw"
-
-awk '{print NR " - ["$0"]"}' "$CACHEDIR/size.bw" > "$CACHEDIR/tmp" && mv "$CACHEDIR/tmp" "$CACHEDIR/size.bw"
-awk '{print "[S:"$1 ", L:"$2"]" }' "$CACHEDIR/seedleech.bw" > "$CACHEDIR/tmp" && mv "$CACHEDIR/tmp" "$CACHEDIR/seedleech.bw"
-
-# Line
-line="$(paste -d\ "$CACHEDIR/size.bw" "$CACHEDIR/seedleech.bw" "$CACHEDIR/titles.bw" \
- | dmenu -i \
- -l 20 \
- -p 'Select Torrent:' \
- -nb '#ffffff' \
- -nf '#000080' \
- -sb '#000080' \
- -sf '#ffffff' \
- | cut -d\- -f1 \
- | awk '{$1=$1; print}')"
-[ -z "$line" ] && exit 0
-
-# 1. Magnet Page
-tailurl="$(head -n $line "$CACHEDIR/links.bw" | tail -n +$line)"
-curl -s "${BASEURL}${tailurl}/" > "$CACHEDIR/tmp.html"
-
-# 2. Magnet Link
-magnet="$(grep -Po 'magnet:\?xt=urn:btih:[a-zA-Z0-9]*' "$CACHEDIR/tmp.html" | head -n 1)"
-
-# 3. Magnet Action
-./rmt-action 'Torrent' "$magnet"
-
diff --git a/lib/search/Odysee b/lib/search/Odysee
deleted file mode 100755
index 58c900f..0000000
--- a/lib/search/Odysee
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /bin/bash
-
-source ./util/menu/deasy
-
-query="$(deasy "$1" 'Search Odysee')"
-selected="$(./ext/ytfzf -D -L -cO "$query")"
-[ -z "$selected" ] && exit 0
-
-./rmt-action "$2" "$selected"
-
diff --git a/lib/search/PeerTube b/lib/search/PeerTube
deleted file mode 100755
index ce083f2..0000000
--- a/lib/search/PeerTube
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /bin/bash
-
-source ./util/menu/deasy
-
-query="$(deasy "$1" 'Search PeerTube')"
-selected="$(./ext/ytfzf -D -L -cP "$query")"
-[ -z "$selected" ] && exit 0
-
-./rmt-action "$2" "$selected"
-
diff --git a/lib/search/Wallhaven b/lib/search/Wallhaven
deleted file mode 100755
index 458e0ef..0000000
--- a/lib/search/Wallhaven
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /bin/bash
-
-source ./util/menu/deasy
-source ./util/dpath
-
-query="$(deasy "$1" 'Search Wallhaven')"
-./ext/waldl "$query" "$DPATH"
-
diff --git a/lib/search/YouTube b/lib/search/YouTube
deleted file mode 100755
index 43e3905..0000000
--- a/lib/search/YouTube
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/bash
-
-source ./util/menu/deasy
-
-query="$(deasy "$1" 'Search YouTube')"
-query_type='video'; CH_SUFFIX='\C'
-
-if [[ "$query" == *"$CH_SUFFIX" ]]
- then
- query=${query%"$CH_SUFFIX"}
- query_type='channel'
-fi
-
-[ -z "$query" ] && exit 0
-selected="$(./ext/ytfzf -D -L --type="$query_type" --ii='https://invidious.flokinet.to' "$query")"
-[ -z "$selected" ] && exit 0
-
-./rmt-action "$2" "$selected"
-