resonite-photoexif: fix and use aria2c :D
This commit is contained in:
parent
a16c592b35
commit
ef480d1bd2
|
@ -28,18 +28,17 @@ for resrec; do
|
|||
curl -s "$asseturi" | tail -c +10 | brotli -d | bson2json > "$tmp_json"
|
||||
|
||||
while read -r argline; do
|
||||
echo "$argline"
|
||||
eval "set -- $argline"
|
||||
outfile="$outdir/$timestamp.webp"
|
||||
imguri=$1
|
||||
echo "downloading image $timestamp.webp"
|
||||
curl -s -o "$tmpfile" "$imguri"
|
||||
aria2c -q -d / --allow-overwrite=true --auto-file-renaming=false -o "$tmpfile" "$imguri"
|
||||
if [ $# -gt 1 ]; then
|
||||
meta_place=$2
|
||||
meta_host=$3
|
||||
meta_photographer=$4
|
||||
meta_time=$(date -u -d "@$5" +'%Y:%m:%d %H:%M:%S')
|
||||
shift 4
|
||||
shift 5
|
||||
meta_presentusers=$(sed 's/ /, /g' <<-EOF
|
||||
$*
|
||||
EOF
|
||||
|
@ -79,7 +78,14 @@ Present Users: $meta_presentusers" "$tmpfile" \
|
|||
select(.Type=="FrooxEngine.PhotoMetadata").Data.TimeTaken.Data/1000,
|
||||
select(.Type=="FrooxEngine.PhotoMetadata").Data.UserInfos.Data[].User._userId.Data
|
||||
]
|
||||
| select(. != []) | @sh' < "$tmp_json")
|
||||
| select(. != []) | @sh' < "$tmp_json" \
|
||||
|| jq -r '.Object.Children | .. | objects | .Components.Data | select(. != null)
|
||||
| [ .[]
|
||||
| ( select(.Type=="FrooxEngine.StaticTexture2D").Data.URL.Data
|
||||
| sub("@(resdb:///(?<x>[^.]+))?.*";"https://assets.resonite.com/\(.x)")
|
||||
)
|
||||
]
|
||||
| select(. != []) | @sh' < "$tmp_json")
|
||||
EOF
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue