From 9ab256ded797f78c9e411fe186dde9410be3049d Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Thu, 2 Oct 2025 21:31:13 -0600 Subject: [PATCH] updated tasks to new paths --- src/scripts/tasks.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/scripts/tasks.sh b/src/scripts/tasks.sh index b7bda56..957a4b3 100644 --- a/src/scripts/tasks.sh +++ b/src/scripts/tasks.sh @@ -1,7 +1,9 @@ #! /usr/bin/env nix-shell #! nix-shell -i bash -p bash trashy fd ripgrep file jq curl -directories=("$HOME/Pictures/To Organize/" "$HOME/Downloads/" "$HOME/Downloads/cache") +directories=("$HOME/Pictures/unorganized/" "$HOME/Downloads/" "$HOME/Downloads/cache") +screenshots_dir=$HOME/Pictures/screenshots/ +photos_dir=$HOME/Pictures/photos/camera/ replace_extension() { local file_basename @@ -45,12 +47,11 @@ while IFS= read -r file; do if ! basename "$file" | rg -q 'Screenshot_\d{8}'; then continue fi - echo "moving screenshot $file into $HOME/Pictures/Screenshots/" - command mv -n "$file" "$HOME/Pictures/Screenshots/" + echo "moving screenshot $file into $screenshots_dir" + command mv -n "$file" "$screenshots_dir" done < <(fd . "${directories[@]}" -d 1 -tf --absolute-path) -# screenshots=$HOME/Pictures/Screenshots -classify_directories=("$HOME/Pictures/Screenshots" "$HOME/Pictures/Photos/Camera") +classify_directories=("$screenshots_dir" "$photos_dir") if (($(fd . "${classify_directories[@]}" -tf -d 1 | wc -l) > 0)); then while IFS= read -r file; do date=$(stat -c "%y" "$file" | rg -o "\d{4}-\d{2}-\d{2}") @@ -101,7 +102,7 @@ while IFS= read -r game_dir; do continue fi # Modify this to store your screenshots somewhere else - dir_dest=$(realpath "$HOME/Pictures/Screenshots/Games")/"$game_name" + dir_dest=$(realpath "$screenshots_dir/Games")/"$game_name" dir_game=$(realpath "$dir_steam")/"$game_id"/screenshots # If there are not screenshots currently stored, why bother lol if ! [[ -d $dir_game ]]; then @@ -120,7 +121,7 @@ cyberpunk_dir=$HOME/Games/gog/cyberpunk-2077/drive_c/users/jawz/Pictures/"Cyberp if [[ -d $cyberpunk_dir ]]; then while IFS= read -r file; do echo "Moving cyberpunk screenshots $(basename "$file")" - command mv -n "$file" "$HOME/Pictures/Screenshots/Games/Cyberpunk 2077/" + command mv -n "$file" "$screenshots_dir/Games/Cyberpunk 2077/" done < <(fd . "$cyberpunk_dir" -tf) fi