# t-raptor/piccull architecture

> Architecture diagram of the GitHub repository t-raptor/piccull, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/t-raptor/piccull
- Repository: https://github.com/t-raptor/piccull

## Overview

PicCull is a Windows desktop app for sorting image and video folders. The main workflow is to open a folder, review and mark media, then apply a batch action to marked or unmarked files. It also offers a thumbnail gallery, persistent marks, and configurable external-player support. The runtime is a single Python file, so its responsibilities are represented as components sharing that path. The excerpts show session persistence and media rendering; other capability links rely on the README, not unsampled implementation details.

Main entry points: [`piccull.py`](https://github.com/t-raptor/piccull/blob/main/piccull.py) (Media image loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_review["Review and navigation"]
  node_app["PicCull desktop app<br/>[piccull.py]"]
  node_folder[("Media folder")]
end

subgraph group_media["Media display"]
  node_viewer["Viewer<br/>[piccull.py]"]
  node_gallery["Gallery<br/>[piccull.py]"]
  node_media_loader["Media image loader<br/>[piccull.py]"]
end

subgraph group_state["Marks and actions"]
  node_marks["Mark and undo<br/>[piccull.py]"]
  node_sessions["Session persistence<br/>[piccull.py]"]
  node_batch_apply["Batch apply<br/>[piccull.py]"]
end

subgraph group_integrations["External integrations"]
  node_config["Player configuration<br/>[piccull.py]"]
  node_player["External media player"]
  node_ffmpeg["ffmpeg"]
end

node_user(("User"))

node_user -->|"opens and operates"| node_app
node_app -->|"opens folder"| node_folder
node_viewer -->|"loads media"| node_media_loader
node_gallery -->|"loads thumbnails"| node_media_loader
node_user -->|"toggles marks"| node_marks
node_marks -->|"saves mark state"| node_sessions
node_sessions -->|"reads and writes session"| node_folder
node_user -->|"chooses batch action"| node_batch_apply
node_batch_apply -->|"moves or copies files"| node_folder
node_user -->|"configures player"| node_config
node_config -->|"launches media"| node_player
node_media_loader -.->|"uses for video frames"| node_ffmpeg

click node_app "https://github.com/t-raptor/piccull/blob/main/piccull.py"
click node_viewer "https://github.com/t-raptor/piccull/blob/main/piccull.py"
click node_gallery "https://github.com/t-raptor/piccull/blob/main/piccull.py"
click node_media_loader "https://github.com/t-raptor/piccull/blob/main/piccull.py"
click node_marks "https://github.com/t-raptor/piccull/blob/main/piccull.py"
click node_sessions "https://github.com/t-raptor/piccull/blob/main/piccull.py"
click node_batch_apply "https://github.com/t-raptor/piccull/blob/main/piccull.py"
click node_config "https://github.com/t-raptor/piccull/blob/main/piccull.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_folder,node_user toneBlue
class node_viewer,node_gallery,node_media_loader toneAmber
class node_marks,node_sessions,node_batch_apply toneMint
class node_config,node_player,node_ffmpeg toneRose
```

## Components

### Review and navigation

- [PicCull desktop app](https://github.com/t-raptor/piccull/blob/main/piccull.py): `piccull.py`
- **Media folder**

### Media display

- [Viewer](https://github.com/t-raptor/piccull/blob/main/piccull.py): `piccull.py`
- [Gallery](https://github.com/t-raptor/piccull/blob/main/piccull.py): `piccull.py`
- [Media image loader](https://github.com/t-raptor/piccull/blob/main/piccull.py): `piccull.py`

### Marks and actions

- [Mark and undo](https://github.com/t-raptor/piccull/blob/main/piccull.py): `piccull.py`
- [Session persistence](https://github.com/t-raptor/piccull/blob/main/piccull.py): `piccull.py`
- [Batch apply](https://github.com/t-raptor/piccull/blob/main/piccull.py): `piccull.py`

### External integrations

- [Player configuration](https://github.com/t-raptor/piccull/blob/main/piccull.py): `piccull.py`
- **External media player**
- **ffmpeg**

### Other components

- **User**

## Connections

- User → PicCull desktop app: opens and operates (evidence: `README.md`)
- PicCull desktop app → Media folder: opens folder (evidence: `README.md`)
- Viewer → Media image loader: loads media (evidence: `piccull.py`)
- Gallery → Media image loader: loads thumbnails (evidence: `piccull.py`)
- User → Mark and undo: toggles marks (evidence: `README.md`)
- Mark and undo → Session persistence: saves mark state (evidence: `piccull.py`)
- Session persistence → Media folder: reads and writes session (evidence: `piccull.py`)
- User → Batch apply: chooses batch action (evidence: `README.md`)
- Batch apply → Media folder: moves or copies files (evidence: `README.md`)
- User → Player configuration: configures player (evidence: `README.md`)
- Player configuration → External media player: launches media (evidence: `README.md`)
- Media image loader → ffmpeg: uses for video frames (evidence: `README.md`)
