blob: 3b6d0dfb48616ecf3f1a2ceb7ed24c91c27f6e19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
#!/bin/sh
xwallpaper --stretch /tmp/black.png
ping -c 1 bing.com || exit 1
test -f "$HOME"/.local/bin/bbid.py || wget "https://raw.githubusercontent.com/ostrolucky/Bulk-Bing-Image-downloader/master/bbid.py" || exit 1
# list of search terms to scrape
grablist=" "
# url to get to the audio from
url="https://www.youtube.com/watch?v=GQajvwtDK94"
# image limit
limit=100
# whether or not it should be spicy
spicy=0
#whether or not to archive it to use for lord knows what
archive=0
# list of layouts from bing
layouts="square wide tall"
while [ $# -gt 0 ] ; do
case $1 in
-s)
spicy=1
echo "Don't worry we'll make it EXTRA SPICY for you."
notify-send --urgency=critical "Warning!" "Spicy mode (NSFW) has been enabled."
;;
-a)
archive=1
;;
-l)
shift
limit=$1
echo "Limit set to $limit."
;;
*)
grablist="$grablist $1"
;;
esac
shift
done
# it aint no fun when the guyz cant have none
if [ -z $grablist ]; then
echo "wtf bruh theres nothing to scape dummy."
exit 1
fi
echo $grablist
# download pictures of what have you and the music
if [ ! -d /tmp/hot ] ; then
yt-dlp -x -o "/tmp/hot/song.%(ext)s" "$url"
echo "Sorry just a moment. Gotta fill teh spank bank lol."
notify-send "Don't worry it won't take long." "Sorry just a moment. Gotta fill teh spank bank lol."
mkdir -v /tmp/hot
for item in $grablist; do
echo "Scraping $item..."
sleep 1
case $spicy in
"1")
python3 "$HOME"/.local/bin/bbid.py -o /tmp/hot/$item -s "$item" --limit $limit --adult-filter-off
#for layout in $layouts; do
# python3 $HOME/.local/bin/bbid.py -o /tmp/hot/$item -s "$item" --filter "+filterui:aspect-$layout" --adult-filter-off
# sleep 1
#done
;;
"0")
python3 "$HOME"/.local/bin/bbid.py -o /tmp/hot/$item -s "$item" --limit $limit || exit 1
;;
esac
notify-send "$item download complete!" "The download for the search term $item has been completed!"
done
fi
# archive it for uh... later usage
if [ $archive -eq 1 ] ; then
tar -cvf /tmp/hot.tgz /tmp/hot
notify-send "Archive Complete!" "The archiving of the downloaded files has been completed."
fi
echo "Scraping completed!"
#espeak "The spank bank has been filled."
# use find command to get all images in the directory
imgs=$(find /tmp/hot -type f -name '*' -print | sort -R)
total=$(echo $imgs | wc -l)
# notify user of impending sexual arousal (or whatever it is you wanted)
notify-send "You know what time it is?" "It's time to get jiggy!"
echo "Get ready to see sum epic jigginess lol."
# play music without video
mpv --vid=no /tmp/hot/song.opus &
espeak "yeah baby"
for img in $imgs; do
if pgrep mpv; then
echo "Displaying image $(basename $img)... (1 out of $total)"
xwallpaper --stretch $img || xwallpaper --clear
sleep 1
else
xwallpaper --stretch /tmp/black.png
notify-send "Aww man..." "Looks like the song has ended... :("
sleep 1
break
fi
done
# set the wallpaper to black to avoid embarrassment
xwallpaper --stretch /tmp/black.png
# kill the mpv process cause the prank is over
pkill mpv
# sigify the dissapointment caused by the sexually stimulating party ending
espeak "Aww man..."
# also please don't leave a folder of god knows what in the temp filesystem
find /tmp/hot -type f -exec shred {} \;
rm -rfv /tmp/hot
# goodbye glad everything went to plan
exit 0
|