Skip to content

feat(scripts): photolab-flatten.py --skip-paired-jpegs - #53

Closed
tsvb wants to merge 1 commit into
mainfrom
photolab-flatten-skip-paired
Closed

tsvb wants to merge 1 commit into
mainfrom
photolab-flatten-skip-paired

Conversation

@tsvb

@tsvb tsvb commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Why

Most cameras shooting RAW+JPEG write both files for every shot, so the flat folder from photolab-flatten.py shows each of those shots twice in PhotoLab. On EX400U's capture_one archive, 3,287 of the 3,784 JPEGs are the camera's copy of a RAW sitting beside them.

What

--skip-paired-jpegs leaves out a JPEG (jpg/jpeg/jpe) when a RAW with the same name, ignoring case, is in the same folder.

  • JPEG-only shots are still linked.
  • A RAW and a JPEG kept in different folders are both linked.
  • It works alongside --ext: pairing is decided by what's on disk, not by which formats are being linked.
  • The summary line reports how many paired JPEGs were left out.
  • Behaviour without the flag is unchanged.

README and the [Unreleased] CHANGELOG entry updated.

Testing

  • Synthetic tree: tested without the flag (output identical to before), with the flag, with the flag plus --ext jpg, with a RAW and JPEG in split folders, and a real run followed by an idempotent re-run.
  • Real run on /Volumes/EX400U/capture_one → /Volumes/EX400U/PhotoLab-All: 3,949 links (3,451 RAW, 497 JPEG-only, 1 TIFF), 3,287 paired JPEGs left out, no broken links, nothing written inside the source, and the re-run kept all 3,949.

🤖 Generated with Claude Code

A RAW+JPEG camera writes two files per shot, so the flat folder showed
every such shot twice in PhotoLab. With the flag, a JPEG is left out
when a RAW of the same name (case-insensitive) sits in the same folder;
JPEG-only shots are still linked. Pairing only looks within a folder,
so a RAW and a JPEG filed apart are both kept. The summary reports how
many paired JPEGs were left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tsvb

tsvb commented Sep 27, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #54: the script became flatlink, which ships --skip-paired-jpegs, and #54 removes the script in favour of it.

@tsvb tsvb closed this Sep 27, 2026
tsvb added a commit that referenced this pull request Sep 27, 2026
…w style (#54)

scripts/photolab-flatten.py grew into flatlink (tsvb/flatlink), a
signed, notarized Swift tool installed with `brew install
tsvb/tap/flatlink`. Remove the script and point the README and the
Unreleased CHANGELOG entry at flatlink. Record that PhotoLab 9.12
writes the .dop beside the link, not the original, so the link folder
holds the user's edits: keep it outside the library and back it up.
List check-appcast-signature.sh in the project layout.

Render a cask that passes brew style: `depends_on macos: :sonoma` and
livecheck before auto_updates. The committed 0.5.1 cask is re-rendered
by the script; the tap gets it with the next release.

Supersedes #53.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tsvb
tsvb deleted the photolab-flatten-skip-paired branch September 27, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant