feat: metadata export-naming tokens + single-image file naming - #1309
Open
SandeepSubba wants to merge 1 commit into
Open
feat: metadata export-naming tokens + single-image file naming#1309SandeepSubba wants to merge 1 commit into
SandeepSubba wants to merge 1 commit into
Conversation
- Export filename templates now support metadata tokens matching the Metadata
panel's editable fields: {title} (ImageDescription), {author} (Artist),
{copyright} (Copyright) and {comments} (UserComment). Values are read lazily
from the image's cached EXIF and sanitized so they are safe in a filename.
- The File Naming section now shows for single-image export too (previously
multi-select only); {sequence} stays hidden for single images. Single-image
export resolves the template via a new generate_export_filename command so it
supports the same tokens (dates, metadata, original filename) as batch.
- Guard against a persisted/imported template referencing an unknown token
(e.g. a stray {dcp_title} saved into the last-used preset): unknown tokens now
fall back to the original default {original_filename}_edited.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds image-metadata tokens to export filename templates, and shows the File
Naming section for single-image export (previously it only appeared when
multiple images were selected).
Type of Change
Changes Made
editable fields:
{title}(ImageDescription),{author}(Artist),{copyright}(Copyright),{comments}(UserComment). Values are read lazilyfrom the image's cached EXIF and sanitized so they're safe in a filename.
{sequence}stays hidden for single images. Single-image export resolves the template via a
new
generate_export_filenamecommand, so it supports the same tokens (dates,metadata, original filename) as batch export.
default
{original_filename}_editedinstead of leaking the literal token intothe output filename.
Screenshots/Videos
Testing
Built and ran via
tauri dev. Verified the File Naming section now shows for asingle image, the metadata/date tokens resolve into the suggested filename, and
an unknown token falls back to the default.
cargo checkand the Vite build areclean.
Test Configuration:
Checklist
Additional Notes
.rrdatasidecar's cachedEXIF, so unrelated callers pay no extra I/O. Batch export and the rename/import
tools get the same tokens for free since they share the template function.
{title}may beempty;
{author}/{copyright}come through.npm run typechecksurfaces pre-existing strict-tscerrors in the repounrelated to this PR; the Vite/esbuild build does not gate on them.
AI Disclaimer: