Update various scripts
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
# TODO: add interative selection of "kind of commission" for output folder
|
# TODO: add interative selection of "kind of commission" for output folder
|
||||||
|
|
||||||
cur_dir=`pwd`
|
cur_dir=`pwd`
|
||||||
furry_commission_ideas_path=/mnt/e/home/Documents/sync/gdrive-zakdragonbites/furry-commission-ideas
|
furry_commission_ideas_path=/mnt/e/home/Documents/sync/nextcloud-pudimxyz-cloud/furry-commission-ideas
|
||||||
furry_commission_ideas_urls_filename="urls.txt"
|
furry_commission_ideas_urls_filename="urls.txt"
|
||||||
scripts_path=~/repos/cloudalb/personal-devboot/scripts/shell
|
scripts_path=~/repos/cloudalb/personal-devboot/scripts/shell
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ media_url=`sed 's:/*$::' <<< "$media_url"`
|
|||||||
|
|
||||||
cd $furry_commission_ideas_path
|
cd $furry_commission_ideas_path
|
||||||
|
|
||||||
existing_folders=($(find * -type d))
|
existing_folders=($(find * -type d -not -path artists -not -path kinks -not -path ideas))
|
||||||
|
|
||||||
filtered_existing_folders=()
|
filtered_existing_folders=()
|
||||||
|
|
||||||
@@ -77,6 +77,7 @@ input_select_folder() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$selected_folder" ]; then
|
if [ -z "$selected_folder" ]; then
|
||||||
|
printf "\n"
|
||||||
echo "[INFO] Folders:"
|
echo "[INFO] Folders:"
|
||||||
for ((i = 0; i < ${#existing_folders[@]}; i++)); do
|
for ((i = 0; i < ${#existing_folders[@]}; i++)); do
|
||||||
foldername=${existing_folders[$i]}
|
foldername=${existing_folders[$i]}
|
||||||
@@ -95,8 +96,10 @@ fi
|
|||||||
|
|
||||||
cd $selected_folder
|
cd $selected_folder
|
||||||
|
|
||||||
if grep -qE "$media_url" -i "$furry_commission_ideas_urls_filename"; then
|
if [ -f "$furry_commission_ideas_urls_filename" ] && grep -qE "$media_url" -i "$furry_commission_ideas_urls_filename"; then
|
||||||
|
printf "\n"
|
||||||
echo "[INFO] This folder already has the media informed."
|
echo "[INFO] This folder already has the media informed."
|
||||||
|
echo "[INFO] Exiting..."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
gallery-dl $1
|
media_url=$1
|
||||||
|
|
||||||
|
gallery-dl $media_url
|
||||||
|
cmd_exit_code=$?
|
||||||
|
|
||||||
|
if [[ $cmd_exit_code -ne 0 ]]; then
|
||||||
|
printf "\n"
|
||||||
|
|
||||||
|
echo "[ERROR] `basename $0`: Could not download url \"$media_url\""
|
||||||
|
echo "[ERROR] Exit status: $cmd_exit_code"
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
find gallery-dl -type f -exec mv '{}' . \;
|
find gallery-dl -type f -exec mv '{}' . \;
|
||||||
rm --recursive gallery-dl
|
rm --recursive gallery-dl
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
ADB_PATH="/mnt/e/programs/scrcpy-win64-v2.3.1"
|
ADB_PATH="/mnt/e/programs/scrcpy-win64-v2.4"
|
||||||
$ADB_PATH/scrcpy.exe --turn-screen-off --stay-awake --power-off-on-close --max-size=1024
|
$ADB_PATH/scrcpy.exe --turn-screen-off --stay-awake --power-off-on-close --max-size=1024
|
||||||
|
|||||||
Reference in New Issue
Block a user