rexiftool: unify print format across sections#49
Merged
Conversation
- Section headers all share a 48-char `-- Title ---` style; show
`-- EXIF --` only when an Embedded Track or Format Metadata
section also follows, so single-section output stays uncluttered.
- Key column auto-sizes from the widest tag (clamped 32..=48) so
long MakerNote/Unknown keys no longer break alignment.
- Directory mode prints `File: {path}` via `Path::display()` instead
of the debug-quoted `OsStr`, and reuses the same divider width.
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.
Summary
Tightens up
rexiftool's default (non-JSON) output so the three sections look like one tool rather than three.-- Title -----...style. PreviouslyEmbedded Trackhad a long tail,Format Metadatahad only--, and the dir-mode separator was a different width again.MakerNoteorUnknown(0xNNNN)tag exceeded that width. It now clamps to32..=48based on the widest key in the section.-- EXIF --header only when needed. Added so the main section is no longer asymmetric vs. Embedded/Format, but suppressed when no extra section follows — single-section files stay uncluttered.File:line now usesPath::display()instead of the debug-quotedOsStr, and the divider matches the new section width.JSON output is untouched.
Test plan
cargo build -p rexiftoolcargo fmt --checktestdata/exif-both.png), motion photo with embedded MP4 (testdata/motion_photo_pixel_synth.jpg), plain JPEG (single section, no-- EXIF --header), and directory mode.