diff --git a/scripts/purge_images.sh b/scripts/purge_images.sh deleted file mode 100755 index a394e6c..0000000 --- a/scripts/purge_images.sh +++ /dev/null @@ -1,15 +0,0 @@ -##!/bin/bash - -# If there are images in img/ that are not being used by the Zettelkasten, delete them - -# Loop through /img directory -find "/home/thomas/repos/eolas/img" -type f | while read filename; do - # Check each .md file in ZK for image - search_result=$(rg "${filename##*/}" "${EOLAS_PATH}/zk" --type markdown) - # If the image is not found in any file, delete it - if [ -z "$search_result" ]; then - echo "Deleted unused image: ${filename##*/}" - rm $filename - fi -done - diff --git a/scripts/upload_images_to_s3.sh b/scripts/upload_images_to_s3.sh new file mode 100755 index 0000000..92b612a --- /dev/null +++ b/scripts/upload_images_to_s3.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +aws --profile garage --endpoint-url https://s3.systemsobscure.net s3 sync "$(pwd)/img/" s3://eolas/ + +## List current images in bucket: +# aws --profile garage --endpoint-url https://s3.systemsobscure.net s3 ls s3://eolas/