mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
update
This commit is contained in:
21
ani-cli
21
ani-cli
@@ -21,6 +21,7 @@ help_text () {
|
||||
USAGE: $prog <query>
|
||||
-h show this help text
|
||||
-d download episode
|
||||
-c cast anime
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -36,11 +37,7 @@ err () {
|
||||
search_anime () {
|
||||
# get anime name along with its id
|
||||
search=$1
|
||||
titlepattern='<a href="/category/'
|
||||
|
||||
curl -s "https://$site//search.html" \
|
||||
-G \
|
||||
-d "keyword=$search" |
|
||||
curl -s "https://$site//search.html?keyword=$search" |
|
||||
sed -n -E '
|
||||
s_^[[:space:]]*<a href="/category/([^"]*)" title="([^"]*)".*_\1_p
|
||||
'
|
||||
@@ -176,7 +173,11 @@ open_episode () {
|
||||
printf "%s\n" "$video_url"
|
||||
|
||||
if [ $is_download -eq 0 ]; then
|
||||
if [ $is_cast -eq 0 ]; then
|
||||
setsid -f $player_fn --http-header-fields="Referer: $embedded_url" "$video_url" >/dev/null 2>&1
|
||||
else
|
||||
catt cast "$video_url"
|
||||
fi
|
||||
else
|
||||
printf "Downloading episode $episode ...\n"
|
||||
# add 0 padding to the episode name
|
||||
@@ -195,11 +196,12 @@ open_episode () {
|
||||
############
|
||||
|
||||
# to clear the colors when exited using SIGINT
|
||||
trap "printf '$c_reset'; rm -f geckodriver.log; exit 1" INT HUP
|
||||
trap "printf '$c_reset';exit 1" INT HUP
|
||||
|
||||
# option parsing
|
||||
is_download=0
|
||||
while getopts 'hd' OPT; do
|
||||
is_cast=0
|
||||
while getopts 'hdc' OPT; do
|
||||
case $OPT in
|
||||
h)
|
||||
help_text
|
||||
@@ -208,6 +210,9 @@ while getopts 'hd' OPT; do
|
||||
d)
|
||||
is_download=1
|
||||
;;
|
||||
c)
|
||||
is_cast=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
@@ -272,11 +277,9 @@ while :; do
|
||||
;;
|
||||
|
||||
q)
|
||||
rm -f geckodriver.log
|
||||
break;;
|
||||
|
||||
*)
|
||||
rm -f geckodriver.log
|
||||
die "invalid choice"
|
||||
;;
|
||||
esac
|
||||
|
||||
18
bat-status
Executable file
18
bat-status
Executable file
@@ -0,0 +1,18 @@
|
||||
#! /bin/sh
|
||||
|
||||
capacity=$(cat /sys/class/power_supply/BAT0/charge_full)
|
||||
voltage=$(cat /sys/class/power_supply/BAT0/voltage_now)
|
||||
percent=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||
current=$(cat /sys/class/power_supply/BAT0/current_now)
|
||||
cap_now=$(cat /sys/class/power_supply/BAT0/charge_now)
|
||||
health="$(cat /sys/class/power_supply/BAT0/capacity_level)"
|
||||
stats="$(cat /sys/class/power_supply/BAT0/status)"
|
||||
|
||||
printf "Capacity : %.02f Ah\n" "$((capacity/1000))e-3"
|
||||
printf "Status : %s\n" "$health"
|
||||
printf "Percentage : %s\n" "$percent"
|
||||
printf "State : %s\n" "$stats"
|
||||
printf "Capacity now : %.02f Ah\n" "$((cap_now/1000))e-3"
|
||||
printf "Voltage now : %.02f V\n" "$((voltage/1000))e-3"
|
||||
printf "Current now : %.02f A\n" "$((current/1000))e-3"
|
||||
printf "Wattage now : %.02f W\n" "$(((voltage*current)/1000000))e-6"
|
||||
15
lol
Executable file
15
lol
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
ajax_url='https://gogoplay.io/encrypt-ajax.php'
|
||||
|
||||
|
||||
#get the id from the url
|
||||
video_id=$(echo "$*" | cut -d\? -f2 | cut -d\& -f1 | sed 's/id=//g')
|
||||
|
||||
#construct ajax parameters
|
||||
secret_key='3235373436353338353932393338333936373634363632383739383333323838'
|
||||
iv='34323036393133333738303038313335'
|
||||
ajax=$(echo -n -e $video_id | openssl enc -aes256 -K $secret_key -iv $iv -a)
|
||||
|
||||
#send the request to the ajax url
|
||||
curl -H 'x-requested-with:XMLHttpRequest' "$ajax_url" -d "id=$ajax" -d "time=69420691337800813569" | jq -r '.source[].file'
|
||||
14
lol.py
14
lol.py
@@ -1,14 +0,0 @@
|
||||
from selenium import webdriver
|
||||
import sys
|
||||
|
||||
try:
|
||||
chromeop = webdriver.FirefoxOptions()
|
||||
chromeop.add_argument("--headless")
|
||||
temp = webdriver.Firefox(options=chromeop)
|
||||
temp.get(sys.argv[1])
|
||||
print(temp.page_source)
|
||||
finally:
|
||||
try:
|
||||
temp.close()
|
||||
except:
|
||||
pass
|
||||
29
torrent
29
torrent
@@ -1,13 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
full_tor(){
|
||||
notify-send "Torrent:Rukk ja cheecha Download ho rha hai"
|
||||
aria2c -d $2 --seed-time=0 "$1" && notify-send "Torrent:cheecha download hogyi" || notify-send -u critical "Torrent:cheecha error!!"
|
||||
}
|
||||
|
||||
part_tor(){
|
||||
aria2c --dir=$HOME/.cache --bt-metadata-only=true --bt-save-metadata=true "$1"
|
||||
aria2c --show-files=true $HOME/.cache/*.torrent
|
||||
printf "Enter index of the file to download:"
|
||||
read -r ind
|
||||
notify-send "Torrent:Rukk ja cheecha Download ho rha hai"
|
||||
aria2c --select-file=$ind -d $2 --seed-time=0 $HOME/.cache/*.torrent && notify-send "Torrent:cheecha download hogyi" || notify-send -u critical "Torrent:cheecha error!!"
|
||||
rm -f $HOME/.cache/*.torrent
|
||||
|
||||
}
|
||||
|
||||
if [ -z "$*" ]; then
|
||||
magnet="$(xclip -out clipboard)"
|
||||
else
|
||||
magnet=$*
|
||||
fi
|
||||
|
||||
x=$(printf "MOVIES\\nSoftwares" | dmenu -p "Select Directory :" | tr -d '\n')
|
||||
|
||||
notify-send "Torrent:Rukk ja cheecha Download ho rha hai"
|
||||
echo "$magnet"
|
||||
aria2c -d $x --seed-time=0 "$magnet" && notify-send "Torrent:cheecha download hogyi" || notify-send -u critical "Torrent:cheecha error!!"
|
||||
x=$(printf "MOVIES\\nSoftwares" | dmenu -p "Select Directory :" | tr -d '\n')
|
||||
printf "Download>>>\n[f]ull torrent\n[p]artial torrent\n\tenter choice:"
|
||||
read -r ch
|
||||
case $ch in
|
||||
f)
|
||||
full_tor "$magnet" "$x";;
|
||||
p)
|
||||
part_tor "$magnet" "$x";;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user