# Set up arrays with colors read -p "Enter query: " query read -p "Enter directory name: " dirname dir=$(pwd)/$dirname mkdir -pv $dirname/nofilter echo "Bing image downloader will now download files from $query and place them in $dir" colors=( 'BLACK' 'WHITE' 'BROWN' 'GRAY' 'RED' 'YELLOW' 'BLUE' 'ORANGE' 'GREEN' 'PURPLE' 'TEAL' 'PINK' ) layouts=( 'sqaure' 'wide' 'tall' ) mullvad reconnect sleep 5 ping 8.8.8.8 c 3 echo "Now downloading with no filters." notify-send "Now starting bing download." bbid -s "$query" -o $dir/nofilter pic_count=$(ls -l $dir/nofilter | wc -l) notify-send "no_filter $query download finished. $pic_count files downloaded" sleep 3 for color in "${colors[@]}"; do # Setup filter. filter=+filterui:color2-FGcls_${color} notify-send "Starting ${query} ${color} download..." # Tell bbid to download files ping 8.8.8.8 -c 3 for i in 1 2 3 4 5; do bbid -s "${query}" -o $dir/${color} --filters $filter --adult-filter-off && break || sleep 5 done pic_count=$(ls -lR ${dir} | wc -l) notify-send "$query $color download finished. $pic_count files downloaded so far." espeak-ng "Download successful." # change ip address with VPN to mitigate throttling mullvad reconnect sleep 10 done notify -send "Download complete! $pic_count files downloaded." exit 0 notify-send "Starting all colors all layouts download." for layout in "${layout[@]}"; do for color in "${colors[@]}"; do # Setup filter. filter=+filterui:aspect-${layout}+filterui:color2-FGcls_${color} notify-send "Starting $query $layout $color download..." # Tell bbid to download files bbid -s ${query} -o $dir/${layout}/${color} --filters $filter pic_count=$(ls -lR ${dir} | wc -l) notify-send "$query $color download finished. $pic_count files downloaded." mullvad reconnect sleep 5 done done notify-send "All done!" # +filterui:aspect-$layout+filterui:color2-FGcls_$color&first=1