resonite-photoexif: use date for all cuz better
This commit is contained in:
parent
997efef64a
commit
7096d9620a
|
@ -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)"
|
||||
|
|
|
@ -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"' ;;
|
||||
|
|
Loading…
Reference in New Issue