dotfiles/scripts/pentesting/bb-screenshot-batch
rpriven 5b6af65def
Organize scripts and clean up dotfiles
Changes:
- Added 80+ scripts with organized structure
  - payloads/ for third-party pentesting tools
  - pentesting/ for custom security scripts
  - Daily drivers remain flat for fast access
- Converted wes() function to proper script
- Removed .sh extensions from pentesting scripts
- Cleaned up aliases (removed 31 redundant lines)
- Added kanata/, build artifacts to gitignore
- Removed old fre.sh scripts and empty a.out
- Updated configs: helix, tmux, zsh, ulauncher, redshift

Security: All sensitive data excluded via gitignore
2025-11-07 14:48:21 -07:00

52 lines
1.2 KiB
Bash
Executable file

#!/usr/bin/env bash
# Batch process existing screenshots with borders
# Usage: bb-screenshot-batch.sh <directory>
set -euo pipefail
SOURCE_DIR="${1:-.}"
OUTPUT_DIR="${SOURCE_DIR}/processed"
if [[ ! -d "$SOURCE_DIR" ]]; then
echo "Error: Directory not found: $SOURCE_DIR"
exit 1
fi
mkdir -p "$OUTPUT_DIR"
echo "[+] Processing screenshots in: $SOURCE_DIR"
echo "[+] Output directory: $OUTPUT_DIR"
echo ""
# Find all PNG and JPG images
IMAGES=$(find "$SOURCE_DIR" -maxdepth 1 \( -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" \) | sort)
if [[ -z "$IMAGES" ]]; then
echo "[-] No images found in $SOURCE_DIR"
exit 1
fi
COUNT=0
TOTAL=$(echo "$IMAGES" | wc -l)
while IFS= read -r IMAGE; do
((COUNT++))
FILENAME=$(basename "$IMAGE")
OUTPUT_FILE="$OUTPUT_DIR/$FILENAME"
echo "[$COUNT/$TOTAL] Processing: $FILENAME"
# Add professional border and shadow
convert "$IMAGE" \
-bordercolor '#333333' -border 2 \
-bordercolor white -border 10 \
-bordercolor '#333333' -border 2 \
\( +clone -background black -shadow 80x5+5+5 \) \
+swap -background white -layers merge +repage \
"$OUTPUT_FILE"
done <<< "$IMAGES"
echo ""
echo "[✓] Processed $COUNT images"
echo "[✓] Output: $OUTPUT_DIR"