resonite-photoexif: use date for all cuz better

This commit is contained in:
yosh 2023-11-07 20:32:47 -05:00
parent 997efef64a
commit 7096d9620a
2 changed files with 5 additions and 6 deletions

View File

@ -34,11 +34,10 @@ for resrec; do
sub("@resdb:///(?<x>[^.]+).*";"https://assets.resonite.com/\(.x)")' \
< "$tmp_json"
)"
timestamp="$(jq -r '.tags[] | select(contains("timestamp:")) |
sub("timestamp:(?<d>[^T]+)T(?<h>[^:]+):(?<m>[^:]+):(?<s>[^.]+).*";"\(.d)_\(.h)-\(.m)-\(.s)")' \
< "$tmp_recuri"
)"
[ -z "$timestamp" ] && timestamp="$(jq -r '.creationTime | sub("$(?<d>[^T]+)T(?<h>[^:]+):(?>,>[^:]+):(?<s>[^.]+).*";"\(.d)_\(.h)-\(.m)-\(.s)")' < "$tmp_recuri")"
timestamp="$(date -u -d "$(jq -r '.tags[] | select(contains("timestamp:")) |
sub("timestamp:(?<date>.+)";"\(.date)")' \
< "$tmp_recuri")" +'%Y-%m-%d_%H-%M-%S'
)" || timestamp="$(date -u -d "$(jq -r '.creationTime' < "$tmp_recuri")" +'%Y-%m-%d_%H-%M-%S')"
echo "downloading image $timestamp.webp"
tmpfile="$(mktemp)"

View File

@ -23,7 +23,7 @@ save() {
choose() {
while true; do
c="$(printf "save (jxl)\nsave (png)\nedit\nscan" | $MENU)"
c="$(printf "save (jxl)\nsave (png)\nedit\nupload\nscan" | $MENU)"
case "$c" in
save*) save "${c%)}" ;;
edit) eval "$editor"' "$tmpfp"' ;;