# asinghtric/bexif architecture

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

- Interactive diagram: https://gitdiagram.com/asinghtric/bexif
- Repository: https://github.com/asinghtric/bexif

## Overview

BEXIF is a command-line bulk metadata scrubber. The user supplies a file or directory; the CLI discovers supported images and videos, dispatches each file to a format-specific scrubber, and summarizes changes and warnings. Image scrubbers remove metadata chunks or markers while preserving image data, then write changed bytes through a temporary file. Video scrubbing optionally invokes ffmpeg to remux without re-encoding. The source is a single file, so subsystem paths all point to it; the graph reflects the sampled implementation and README capabilities.

Main entry points: [`bexif.py`](https://github.com/asinghtric/bexif/blob/main/bexif.py) (CLI Main)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["CLI Workflow"]
  node_main["CLI Main<br/>[bexif.py]"]
  node_input["Target Files"]
  node_report["Terminal Summary<br/>[bexif.py]"]
end

subgraph group_scrub["Format Scrubbing"]
  node_images["Image Scrubbers<br/>[bexif.py]"]
  node_video["Video Scrubber<br/>[bexif.py]"]
end

subgraph group_io["File I/O"]
  node_writer["Atomic Writer<br/>[bexif.py]"]
  node_ffmpeg["ffmpeg"]
end

node_user(("CLI User"))

node_user -->|"provides target"| node_main
node_main -->|"scans files"| node_input
node_main -->|"dispatches images"| node_images
node_main -->|"dispatches videos"| node_video
node_images -->|"writes changes"| node_writer
node_video -.->|"remuxes streams"| node_ffmpeg
node_video -->|"replaces file"| node_input
node_main -->|"prints results"| node_report

click node_main "https://github.com/asinghtric/bexif/blob/main/bexif.py"
click node_images "https://github.com/asinghtric/bexif/blob/main/bexif.py"
click node_video "https://github.com/asinghtric/bexif/blob/main/bexif.py"
click node_writer "https://github.com/asinghtric/bexif/blob/main/bexif.py"
click node_report "https://github.com/asinghtric/bexif/blob/main/bexif.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_main,node_input,node_report,node_user toneBlue
class node_images,node_video toneAmber
class node_writer,node_ffmpeg toneMint
```

## Components

### CLI Workflow

- [CLI Main](https://github.com/asinghtric/bexif/blob/main/bexif.py): `bexif.py`
- **Target Files**
- [Terminal Summary](https://github.com/asinghtric/bexif/blob/main/bexif.py): `bexif.py`

### Format Scrubbing

- [Image Scrubbers](https://github.com/asinghtric/bexif/blob/main/bexif.py): `bexif.py`
- [Video Scrubber](https://github.com/asinghtric/bexif/blob/main/bexif.py): `bexif.py`

### File I/O

- [Atomic Writer](https://github.com/asinghtric/bexif/blob/main/bexif.py): `bexif.py`
- **ffmpeg**

### Other components

- **CLI User**

## Connections

- CLI User → CLI Main: provides target
- CLI Main → Target Files: scans files
- CLI Main → Image Scrubbers: dispatches images
- CLI Main → Video Scrubber: dispatches videos
- Image Scrubbers → Atomic Writer: writes changes
- Video Scrubber → ffmpeg: remuxes streams
- Video Scrubber → Target Files: replaces file
- CLI Main → Terminal Summary: prints results
