From b82b2b1a4051fe3ee0144f44791397a30ca17dd5 Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 31 Oct 2023 11:04:59 -0400 Subject: init --- build-and-deploy.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 build-and-deploy.sh (limited to 'build-and-deploy.sh') diff --git a/build-and-deploy.sh b/build-and-deploy.sh new file mode 100755 index 0000000..b304213 --- /dev/null +++ b/build-and-deploy.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +build () { + for i in $(comm -13 <(ls photos) <(ls photos-original)) ; do + convert "photos-original/$i" -resize 480x480 "photos/$i" + exiftool -q -q -overwrite_original -Software= -gps:all= -camera:all= "photos/$i" + chmod 644 "photos/$i" + done + + ls photos \ + | sort -r \ + | sed 's~.*~ { "path": "photos/&" },~ ; 1i [ + ; $s/,$//;$a ]' \ + > images.json +} + +build + +rsync --recursive --delete --exclude='*original*' captions.json images.json index.html photos sync_root:/www-public/photos/ -- cgit v1.2.3