Metadata-Version: 2.5
Name: photree
Version: 0.12.0
Summary: Manage photos in a directory tree
Author-email: Sami Dalouche <sami.dalouche@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: <3.15,>=3.14
Requires-Dist: faiss-cpu<2.0,>=1.15.0
Requires-Dist: insightface<2.2,>=2
Requires-Dist: mermaid-ascii-diagrams>=0.1.1
Requires-Dist: numpy<3.0,>=2.5.1
Requires-Dist: onnxruntime<2.0,>=1.28.0
Requires-Dist: opencv-python-headless<5.1,>=5.0.0.93
Requires-Dist: platformdirs<5.0,>=4.11.0
Requires-Dist: pydantic<3.0.0,>=2.12.5
Requires-Dist: pyexiftool<1.0.0,>=0.5.0
Requires-Dist: pyyaml<7.0,>=6.0
Requires-Dist: scikit-learn<2.0,>=1.9.0
Requires-Dist: typer<1.0.0,>=0.27.1
Description-Content-Type: text/markdown

# photree

![Stable Version](https://img.shields.io/pypi/v/photree?label=stable)
![Pre-release Version](https://img.shields.io/github/v/release/iglootools/photree?label=pre-release&include_prereleases&sort=semver)
![Python Versions](https://img.shields.io/pypi/pyversions/photree)
![Download Stats](https://img.shields.io/pypi/dm/photree)
![GitHub Stars](https://img.shields.io/github/stars/iglootools/photree)
![License](https://img.shields.io/github/license/iglootools/photree)
![CI Status](https://github.com/iglootools/photree/actions/workflows/preflight.yml/badge.svg?branch=main)

A CLI tool to import, organize, verify, and export iOS photo albums as plain
directories — preserving originals, edits, and sidecars without any proprietary
database.

[![asciicast](https://asciinema.org/a/k5OGXUFoUjF2SKSf.svg)](https://asciinema.org/a/k5OGXUFoUjF2SKSf)

<!-- toc -->
**On this page**

- [Main Use Cases](#main-use-cases)
- [Non-Goals](#non-goals)
- [Known Limitations](#known-limitations)
- [Philosophy](#philosophy)
- [Related Projects](#related-projects)
- [Installation](#installation)
- [Usage](#usage)
- [Contribute](#contribute)
<!-- tocstop -->

## Main Use Cases

- **Import iOS photos** into organized album directories, preserving originals,
  edits, and AAE sidecars from macOS Image Capture
- **Browse and curate** using the `main-img/`, `main-jpg/`, and `main-vid/`
  directories — the best version of each photo/video, ready to view
- **Share albums** by exporting JPEG-compatible versions to cloud sync folders
  (MEGAsync, Syncthing, etc.) or external drives
- **Back up to external volumes** with full album structure (originals + edits +
  sidecars) using symlinks or hardlinks to save disk space
- **Verify album integrity** with checksums and structural validation, with
  actionable fix suggestions

## Non-Goals

- **Not a photo viewer or editor.** photree organizes files on disk — use your
  favorite viewer (Finder, feh, etc.) to browse `main-img/` or `main-jpg/`.
- **Not a photo management database.** There is no catalog, index, or metadata
  database. Albums are plain directories, readable by any tool.
- **Not a cloud service.** photree exports to directories — pair it with your
  own sync tool (MEGAsync, Syncthing, rsync, etc.).
- **Not cross-platform for import.** The import pipeline requires macOS (`sips`
  for HEIC-to-JPEG conversion). Exported albums are portable.

## Known Limitations

- **macOS required for import.** The `sips` tool (included with macOS) is used
  for HEIC/DNG-to-JPEG conversion. Import is not supported on Linux. Exported
  albums work everywhere.
- **iOS-only import source.** The import pipeline is built around macOS Image
  Capture conventions (IMG_\* naming, AAE sidecars, IMG_E\* edits). Other camera
  sources are not currently supported.
- **No EXIF-based organization.** Album names and dates are derived from
  directory names (YYYY-MM-DD convention), not from EXIF metadata.

## Philosophy

- **Plain directories, no lock-in.** Albums are standard filesystem directories.
  No database, no proprietary format. You can always `ls`, `cp`, `rsync`, or
  browse with any tool.
- **Preserve everything, organize intelligently.** Originals, edits, and
  sidecars are archived under `ios/`. The `main-*` directories provide a clean,
  browsable view without losing source material.
- **Explicit over magic.** Every operation has a dry-run mode. Destructive fixes
  require explicit flags. The tool tells you what it would do before doing it.
- **Composable with existing tools.** photree handles album structure — pair it
  with rsync for backups, MEGAsync for cloud sync, or any viewer for browsing.

## Related Projects

- [Apple Photos](https://www.apple.com/macos/photos/) — Apple's built-in photo
  manager. Great for editing, but uses a proprietary database. photree is for
  people who want plain directories.
- [Immich](https://immich.app/) / [PhotoPrism](https://www.photoprism.app/) —
  Self-hosted photo management with a web UI. A good complement if you want a
  browsable gallery on top of your photree albums.
- [immich-go](https://github.com/simulot/immich-go) — CLI tool to bulk-upload
  photos to Immich. Can be used to upload photree albums.
- [rsync](https://rsync.samba.org/) / [Syncthing](https://syncthing.net/) /
  [MEGAsync](https://mega.io/) — File sync tools. photree exports to directories
  that these tools can sync.
- [ExifTool](https://exiftool.org/) — Metadata extraction and editing. Useful
  alongside photree for EXIF-based workflows.

## Installation

See
[docs/installation.md](https://github.com/iglootools/photree/blob/main/docs/installation.md).

## Usage

See
[docs/usage.md](https://github.com/iglootools/photree/blob/main/docs/usage.md).

## Contribute

See
[CONTRIBUTING.md](https://github.com/iglootools/photree/blob/main/CONTRIBUTING.md)
for development setup, guidelines, and the documentation of the code.
