diff --git a/my-scripts/shell/gallery-dl-queuer.sh b/my-scripts/shell/gallery-dl-queuer.sh new file mode 100755 index 0000000..3509b61 --- /dev/null +++ b/my-scripts/shell/gallery-dl-queuer.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# Initialize variables for output files +success_log="success_log.txt" +failure_log="failure_log.txt" + +# Parse command line arguments +while getopts "f:c:" opt; do + case $opt in + f) + queue_file="$OPTARG" + ;; + c) + command="$OPTARG" + ;; + \?) + echo "Usage: $0 -f -c " + exit 1 + ;; + esac +done + +# Check if both parameters are provided +if [ -z "$queue_file" ] || [ -z "$command" ]; then + echo "Usage: $0 -f -c " + exit 1 +fi + +# Check if the queue file exists +if [ ! -f "$queue_file" ]; then + echo "Queue file not found: $queue_file" + exit 1 +fi + +# Process the queue +while IFS= read -r line; do + # Execute the command with the line as an argument + $command "$line" + # Check the exit status of the command + if [ $? -eq 0 ]; then + echo "Command: $command $line - SUCCESS" >> "$success_log" + else + echo "Command: $command $line - FAILURE" >> "$failure_log" + fi +done < "$queue_file" + +echo "Script completed. Successful commands logged in $success_log. Failed commands logged in $failure_log." diff --git a/my-scripts/shell/gallery-dl-twitter-thread.sh b/my-scripts/shell/gallery-dl-twitter-thread.sh new file mode 100755 index 0000000..cefd413 --- /dev/null +++ b/my-scripts/shell/gallery-dl-twitter-thread.sh @@ -0,0 +1 @@ +gallery-dl -o conversations=1 --filter "author['name']==locals().get('reply_to')" $1