summaryrefslogtreecommitdiffstats
path: root/build-and-deploy.sh
diff options
context:
space:
mode:
authordan <[email protected]>2023-10-31 11:04:59 -0400
committerdan <[email protected]>2023-10-31 11:04:59 -0400
commitb82b2b1a4051fe3ee0144f44791397a30ca17dd5 (patch)
tree7ca62dd3772d2a4b74d677a26baafb5ae3bc0cfa /build-and-deploy.sh
downloadfreegram-b82b2b1a4051fe3ee0144f44791397a30ca17dd5.tar.gz
freegram-b82b2b1a4051fe3ee0144f44791397a30ca17dd5.tar.bz2
freegram-b82b2b1a4051fe3ee0144f44791397a30ca17dd5.zip
Diffstat (limited to 'build-and-deploy.sh')
-rwxr-xr-xbuild-and-deploy.sh19
1 files changed, 19 insertions, 0 deletions
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/