Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
| Albums and sharing | Create, rename, delete, and manage album assets; add users to matching albums in bulk; merge albums; download or mirror an album locally | `albums --help`, `cw add-users-to-album-with-pattern`, `cw merge-album`, `cw download-album` |
| Find and organize | Search by filename, type, camera, location, date, status, OCR, or description; emit pipeable asset IDs; manage tags and tag assignments | `search metadata --help`, `tags --help` |
| Repair and replace | Replace an asset while preserving its Immich metadata; locate missing thumbnails; repair malformed JPEG/TIFF files; remove Google Takeout JSON sidecars | `cw replace-asset`, `cw find-no-thumbhash`, `cw repair-assets` |
| Date and duplicate assistance | Check and correct assets that do not fit date-named albums; find visually similar library assets for a local image | `cw fix-album-dates`, `cw find-similar` |
| Date and duplicate assistance | Check and correct assets that do not fit date-named albums; set capture years from years printed in scanned photos (OCR); find visually similar library assets for a local image | `cw fix-album-dates`, `cw date-from-ocr`, `cw find-similar` |
| Watch folders | Watch local folders and upload new files, or download matching assets as they appear | `cw watch-upload`, `cw watch-download` |
| Server workflows and users | List, inspect, and read logs for Immich server-side workflows; look up users and the authenticated account | `immich-workflow --help`, `users --help` |
| Automation | Preview changes with `--dry-run`, bypass prompts with `--yes`, pass IDs through files or stdin, use JSON/IDs-only output, and retrieve agent instructions from the binary | `immich-admin return-agent-skill` |
Expand Down Expand Up @@ -64,7 +64,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu

<!-- Generated by tools/apitable — do not edit between the markers. Refresh with `go generate ./...` -->
<!-- API-TABLE:BEGIN -->
**28 of 253 endpoints implemented** (24 deprecated and 2 internal endpoints omitted per project policy).
**29 of 253 endpoints implemented** (24 deprecated and 2 internal endpoints omitted per project policy).

<details>
<summary><b>API keys</b> (0/6)</summary>
Expand Down Expand Up @@ -126,7 +126,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
</details>

<details>
<summary><b>Assets</b> (7/24)</summary>
<summary><b>Assets</b> (8/24)</summary>

| Impl | Method | Path | Operation | State |
|:----:|--------|------|-----------|-------|
Expand All @@ -146,7 +146,7 @@ Release binaries are named `immich-admin_<os>_<arch>[.exe]` without a version nu
| | PUT | `/assets/{id}/metadata` | `updateAssetMetadata` | Stable |
| | DELETE | `/assets/{id}/metadata/{key}` | `deleteAssetMetadata` | Stable |
| | GET | `/assets/{id}/metadata/{key}` | `getAssetMetadataByKey` | Stable |
| | GET | `/assets/{id}/ocr` | `getAssetOcr` | Stable |
| ✅ | GET | `/assets/{id}/ocr` | `getAssetOcr` | Stable |
| ✅ | GET | `/assets/{id}/original` | `downloadAsset` | Stable |
| ✅ | GET | `/assets/{id}/thumbnail` | `viewAsset` | Stable |
| | GET | `/assets/{id}/video/playback` | `playAssetVideo` | Stable |
Expand Down
21 changes: 21 additions & 0 deletions docs/client-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Run destructive workflows with `--dry-run` first. Workflows show their planned a
| `cw find-no-thumbhash` | Find assets for which Immich has no thumbnail hash |
| `cw repair-assets` | Repair supported JPEG/TIFF defects or delete confirmed Google Takeout JSON sidecars |
| `cw fix-album-dates` | Check date-named albums and optionally correct exact-day capture dates |
| `cw date-from-ocr` | Set capture years from a year printed in the image (OCR), per asset or interactively per album |
| `cw download-album` | Export or synchronize an album to a local folder |
| `cw find-similar` | Find visually similar Immich assets for a local image through immich-clip-probe |
| `cw merge-album` | Merge album contents and metadata |
Expand Down Expand Up @@ -110,6 +111,26 @@ immich-admin cw fix-album-dates --interactive

Without `--interactive`, one confirmation applies to every reported asset. Use `--yes` only when that bulk behavior is intended.

## Set Capture Years from OCR

`date-from-ocr` is for scanned or re-photographed prints whose real year is printed in the image. It reads Immich's OCR boxes (`assets ocr`) and finds standalone 4-digit years. An asset with exactly one year that differs from its capture year is a `change` candidate: its date becomes `YYYY-06-01 00:00` (mid-year) and it is tagged `immich-admin-cli/date-from-ocr`. Several distinct years are `ambiguous` and never changed automatically. Every hit is printed with its web link; asset links are accepted as input too.

```sh
# Report only (default): status, OCR text, old -> new date, link
immich-admin cw date-from-ocr --album-name "Scans 1980er"

# Apply only the unambiguous single-asset changes
immich-admin cw date-from-ocr --album-name "Scans 1980er" --yes

# Review hits grouped by album (terminal required)
immich-admin cw date-from-ocr https://immich.example.com/photos/<id> --interactive

# Whole library: one OCR search per year, then review (skips assets whose year already matches)
immich-admin cw date-from-ocr --all --interactive
```

`--interactive` offers `[s]kip`, `[t]his -> YYYY`, `[a]lbum -> YYYY`, `[n]ext album` (skip the rest of this album), `[y]ear...` (type another year), `[o]pen` (browser) and `[q]uit`. `[a]lbum` lists every asset of the album with its current and new date and asks again (default No); assets that are already in that year are kept, and the propagated ones are tagged `immich-admin-cli/date-from-ocr-album`. `--all` finds many numbers that are not dates (e.g. "seit 1938", "2000 qm"), so it is refused together with `--yes`; review the `--all --json` report or use `--all --interactive`. Album-wide changes are not available outside `--interactive`. Like `fix-album-dates`, this uses the deprecated `updateAsset` endpoint.

## Download or Mirror an Album

`download-album` resolves exactly one album by `--album-id` or `--album-name`, downloads its assets, and can optionally keep a local folder synchronized.
Expand Down
Loading
Loading