flowcull 0.1.0

Fast photo culling with raw/JPEG pair support
# Contributing to FlowCull

This page explains what FlowCull is for, what it deliberately is not, and how to get a change in.

## Aim

FlowCull has one job: to help you go from "a folder of shots" to "the keepers" as fast as
possible. These are the projects priorities:

1. **Speed first.** Flipping between photos must feel instant. A short, visible loading step when
   a folder opens is acceptable; waiting while culling is not.
2. **Raw + JPEG pairs are one photo.** Label once, export or delete both.
3. **Zero friction.** Keyboard, touch and mouse all work; nothing needs configuring before the
   first photo appears.
4. **Self-contained.** One binary, no runtime dependencies, works cross-platform.

## Scope

**In scope**

- Browsing, labeling (pick / reject / unlabeled), exporting picks, removing rejects.
- Showing raw files via the preview the camera embeds; adding raw formats that follow that
  pattern.
- Anything that makes the above faster or more reliable.

**Out of scope** (open an issue if you think one deserves an exception)

- Automated culling, neither algorithmically or prediction-based.
- Raw development, editing, color management, ratings beyond pick / reject, metadata editing.
- Catalogs or databases. State lives next to the photos in `.flowcull.json`, nowhere else.
- Cloud, sync, accounts, plugins.
- Settings pages. A behavior either has one good default or is a keyboard toggle.

## Working on the code

```sh
cargo run --release -- /path/to/photos   # run; debug builds are too slow for real folders
cargo test                                # unit tests
cargo clippy --all-targets                # must be warning-free
cargo fmt                                 # before committing
FLOWCULL_SAMPLE=/path/to/photo.raf cargo test --release -- --ignored --nocapture
                                          # decode timing on a real file
```

Layout:

| File | Job |
| --- | --- |
| `src/main.rs` | App state, event loop, panels, swipe handling |
| `src/catalog.rs` | Folder scan, raw/JPEG pairing, label persistence |
| `src/decode.rs` | JPEG decoding and embedded-preview extraction from raw files |
| `src/ops.rs` | Export and removal |
| `src/theme.rs` | Colors and the small painted widgets |

Guidelines:

- Prefer the smallest change that fully solves the problem. No options, abstractions or
  configuration that nothing asks for yet.
- Keep the UI thread free: decoding and file operations run on worker threads and report back
  through the message channel.
- New logic gets one focused test that fails when the logic breaks. No smoke tests.
- A known limitation goes in a `// shortcut: <limit>, <when to upgrade>` comment at the spot.
- Conventional Commits for messages (`feat:`, `fix:`, `perf:`, `docs:`, ...), and a line in
  `CHANGELOG.md` under *Unreleased* for anything a user would notice.

## Continuous integration

Two workflows in `.github/workflows/`:

- **`ci.yml`** runs on every push to `main` or `develop` and on every pull request, on Linux,
  Windows and macOS: `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings` and
  `cargo test`. A pull request must be green on all three before it is merged; run the same
  three commands locally first.
- **`release.yml`** runs when a `v*` tag is pushed. It builds installers with
  [cargo-packager]https://docs.crabnebula.dev/packager/ (configured under
  `[package.metadata.packager]` in `Cargo.toml`): NSIS and MSI installers plus a portable zip
  for Windows x64, NSIS and portable zip for Windows ARM64, `.deb` and AppImage for Linux x64,
  and a universal `.dmg` for macOS. It then publishes a GitHub Release whose notes are the
  matching version section of `CHANGELOG.md`, followed by GitHub's generated list of changes.
- **`winget.yml`** runs when a release is published and opens a version-bump pull request on
  [winget-pkgs]https://github.com/microsoft/winget-pkgs for `RalfG.FlowCull`. Scoop's
  `extras` bucket needs no workflow: Scoop auto-updates from the release page. `release.yml`
  also publishes the crate to crates.io through trusted publishing (configured on crates.io
  under the crate's settings, no token in the repository).
  To try a package locally: `cargo install cargo-packager`, then
  `cargo packager --release --formats nsis` (or `deb`, `dmg`, ...). Output lands in
  `target/packages/`.

Releasing: move the *Unreleased* section of `CHANGELOG.md` under the new version, bump
`version` in `Cargo.toml`, commit, tag `vX.Y.Z` and push the tag.

## Reporting a raw format that does not show

Attach or link a sample file (CC0 samples on [raw.pixls.us](https://raw.pixls.us/) are ideal) and
the camera model. Most fixes are a few lines in `decode.rs`.

## License

By contributing you agree that your work is licensed under both the MIT and Apache-2.0 licenses,
like the rest of the project, without any additional terms.