diff options
| author | Jakob L. Kreuze | 2022-11-15 19:17:44 -0500 |
|---|---|---|
| committer | Jakob L. Kreuze | 2022-11-15 19:17:44 -0500 |
| commit | 2c666a53e847e6b49dbdf4fd22416872bb197f6b (patch) | |
| tree | 9bacca9cdc0ee645941bc09b61d1d6a91d6f2678 /dynamic/import-images.sh | |
| parent | b6482d86fa58dee7d55889fa873463274f81d3db (diff) | |
[dynamic] Move to `haunt' directory and `jakob' namespace
There will likely be some refactoring later as part of this change, since we can
unify the `util' namespaces.
Diffstat (limited to 'dynamic/import-images.sh')
| -rw-r--r-- | dynamic/import-images.sh | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/dynamic/import-images.sh b/dynamic/import-images.sh deleted file mode 100644 index 23f6130..0000000 --- a/dynamic/import-images.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VANITY="$1" -shift - -for item in "$@"; do - filename=$(basename -- "$item") - extension="${filename##*.}" - filename="${filename%.*}" - uuid="$(uuidgen)" - cp "$item" "/home/jakob/gallery-images/$uuid.$extension" - convert "/home/jakob/gallery-images/$uuid.$extension" -thumbnail '100x100>' "/home/jakob/gallery-images/${uuid}_thumb.png" - psql jakob_gallery -c "INSERT INTO images (vanity, title, filename, thumb_filename, datetime) VALUES ('$VANITY', '$filename', '$uuid.$extension', '${uuid}_thumb.png', now());" -done |