Many changes

This commit is contained in:
2025-12-25 18:51:45 -03:00
parent d355c1fc3b
commit d0624539a7
11 changed files with 192 additions and 15 deletions

View File

@@ -2,7 +2,7 @@
show_help() {
# echo "Usage: `basename $0` [--no-abort-on-found] [--parallel] [--custom-grep-search|-c <string>]"
echo "Usage: $(basename $0) [--help|-h] [--filter-mode|-f]"
echo "Usage: $(basename "${0}") [--help|-h] [--filter-mode|-f]"
echo "Options:"
echo " --help | -h (optional) Display script's help text"
echo " --filter-mode | -f (optional) The script iterate over the files of a selected folder and store the ones that should be deleted"
@@ -12,7 +12,6 @@ show_help() {
filter_mode=false
urls_list_arg=""
interactive_mode=false
while [ "$#" -gt 0 ]; do
case "$1" in
@@ -28,10 +27,6 @@ while [ "$#" -gt 0 ]; do
urls_list_arg="$2"
shift
;;
-i)
interactive_mode=true
shift 2
;;
*) shift ;;
esac
done
@@ -39,7 +34,7 @@ done
commands_to_check=(gallery-dl gdl.sh feh xdotool)
commands_not_found=()
for command in ${commands_to_check[@]}; do
for command in "${commands_to_check[@]}"; do
if ! command -v "$command" &>/dev/null; then
commands_not_found+=("$command")
fi
@@ -48,16 +43,15 @@ done
if [ ${#commands_not_found[@]} -ne 0 ]; then
echo 'The following commands are necessary in order to run the script, but were not found:'
for command in ${commands_not_found[@]}; do
for command in "${commands_not_found[@]}"; do
echo " \"$command\""
done
exit 1
fi
furry_commission_ideas_path=/mnt/e/clouds/nextcloud-velha-casa/data-hoarding/furry-downloads
# furry_commission_ideas_path=/mnt/e/home/documents-unsorted/data-hoarding/furry-downloads
# furry_commission_ideas_path=/mnt/e/home/downloads/furry-downloads
furry_commission_ideas_path='/media/hd/clouds/nextcloud-strawberry/data-hoarding/furry-downloads'
# furry_commission_ideas_path='/mnt/e/clouds/nextcloud-strawberry/data-hoarding/furry-downloads'
furry_commission_ideas_urls_filename="urls.txt"
scripts_path=/home/cloud/git/personal-devboot/scripts/shell
@@ -234,7 +228,7 @@ fill_existing_folders_array() {
ignore_paths_depth_2=("artists")
ignore_paths_depth_last=("no-source" ".bsky.social" "old" "mine")
find_command="find * -type d"
find_command="find * -maxdepth 1 -type d"
for path in "${ignore_paths[@]}"; do
find_command+=" -not -path $path"