Add --ml and --exif flags to backup-metadata
--ml fetches face detections and CLIP embeddings from the /files/data/fetch endpoint (type 'mldata'). Each blob is encrypted with the file's key and gzipped; we decrypt with decryptBlob, gunzip, and include the parsed JSON as 'mlData' in the per-file output. Fetched in batches of 200 file IDs. --exif downloads each file, runs sharp().metadata() to extract image properties (format, dimensions, color space, orientation), then parses the raw EXIF buffer with exif-reader for structured tags (lens, ISO, shutter, aperture, GPS altitude, etc.). Also captures raw IPTC, XMP, and ICC profile data. Included as 'imageMetadata' in the per-file output. Without either flag, behavior is unchanged (fast metadata-only dump). Adds exif-reader 2.0.3 as a runtime dependency. 3 new tests (ML data decrypted, ML data absent when flag not set, EXIF extraction). 119 total tests, all green.
This commit is contained in:
@@ -557,7 +557,7 @@
|
||||
dependencies:
|
||||
undici-types "~6.21.0"
|
||||
|
||||
"@types/sharp@^0.32.0":
|
||||
"@types/sharp@0.32.0":
|
||||
version "0.32.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/sharp/-/sharp-0.32.0.tgz#fc3ac6df6b456319bae807c3d24efdc6631cdd6f"
|
||||
integrity sha512-OOi3kL+FZDnPhVzsfD37J88FNeZh6gQsGcLc95NbeURRGvmSjeXiDcyWzF2o3yh/gQAUn2uhh/e+CPCa5nwAxw==
|
||||
@@ -1026,6 +1026,11 @@ esutils@^2.0.2:
|
||||
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
|
||||
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
|
||||
|
||||
exif-reader@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/exif-reader/-/exif-reader-2.0.3.tgz#259997735080bc6bb959c37b32c60f004ec4391d"
|
||||
integrity sha512-zFbQvguwT9JkqyYhR7pjE1Yn8SagwaGLNRU0Oh14xFa1paSf5Gzxn4gxgk0XhnudI0UIqU+HgnBX93+nva592A==
|
||||
|
||||
expect-type@^1.1.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/expect-type/-/expect-type-1.3.0.tgz#0d58ed361877a31bbc4dd6cf71bbfef7faf6bd68"
|
||||
@@ -1451,7 +1456,7 @@ semver@^7.6.0, semver@^7.7.3:
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.8.0.tgz#ed0661039fcbcda2ce71f01fa6adbefaa77040df"
|
||||
integrity sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==
|
||||
|
||||
sharp@*, sharp@^0.34.5:
|
||||
sharp@*, sharp@0.34.5:
|
||||
version "0.34.5"
|
||||
resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.34.5.tgz#b6f148e4b8c61f1797bde11a9d1cfebbae2c57b0"
|
||||
integrity sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==
|
||||
|
||||
Reference in New Issue
Block a user