Compare commits
69 Commits
af2c148747
...
compare
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c2504ff83 | |||
| 43772aba68 | |||
| 145368692e | |||
| bf1134e47f | |||
| 7580036c9d | |||
| 47a75b428e | |||
| b91a2f0a31 | |||
| 66795471a8 | |||
| 67acb8e08a | |||
| af0cc52d89 | |||
| 3669814731 | |||
| a8edc251a2 | |||
| d43813cc2a | |||
| 97424ea0af | |||
| eafc5de6f2 | |||
| fa710e914e | |||
| e3e337af88 | |||
| 15ca74ad4b | |||
| a11d76fd5f | |||
| cf1238bbff | |||
| d3b7f31730 | |||
| 52c06c4db7 | |||
| 3a320f3187 | |||
| c37e2bd5e0 | |||
| 9418661be9 | |||
| 7349015177 | |||
| 918a6e9414 | |||
| 5909c0ec99 | |||
| 286b0410ff | |||
| 0c18f570d4 | |||
| 3f2160405a | |||
| f3f57f7c53 | |||
| 957aab0656 | |||
| 0a94548f5e | |||
| 124fbacd2a | |||
| 0f0aeed2f1 | |||
| fe6e55de16 | |||
| dd454ebf6f | |||
| 2854907359 | |||
| 48417b6d73 | |||
| ce7abd8a29 | |||
| df12413c5d | |||
| c56b07f999 | |||
| c89cecd43f | |||
| 37f6166b37 | |||
| dc31b0bebb | |||
| f0b0114fc5 | |||
| 0c9446b3f8 | |||
| 4c49635018 | |||
| 826ae384df | |||
| 54ba10d4e5 | |||
| 0e6de4ae0b | |||
| b919c52255 | |||
| 8fc8372a9b | |||
| 246b78719e | |||
| 0d5f393aff | |||
| 4fb038eda1 | |||
| 690aaafacf | |||
| 3e9ff43bc9 | |||
| 91a0cc5138 | |||
| 588822f856 | |||
| 1cbad1a3ed | |||
| b5794e9db5 | |||
| b938dc68fa | |||
| dde0e90442 | |||
| 0b5e9377e4 | |||
| 091936069a | |||
| 0d1eca4ef3 | |||
| 39153d3493 |
61
CLAUDE.md
Normal file
61
CLAUDE.md
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
Turbo Sorter Pro v12.5 - A dual-interface image organization tool combining Streamlit (admin dashboard) and NiceGUI (gallery interface) for managing large image collections through time-sync matching, ID collision resolution, category-based sorting, and gallery tagging with pairing capabilities.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
# Run Streamlit dashboard (port 8501)
|
||||||
|
streamlit run app.py --server.port=8501 --server.address=0.0.0.0
|
||||||
|
|
||||||
|
# Run NiceGUI gallery (port 8080)
|
||||||
|
python3 gallery_app.py
|
||||||
|
|
||||||
|
# Both services (container startup)
|
||||||
|
./start.sh
|
||||||
|
|
||||||
|
# Syntax check all Python files
|
||||||
|
python3 -m py_compile *.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
### Dual-Framework Design
|
||||||
|
- **Streamlit (app.py, port 8501)**: Administrative dashboard with 5 modular tabs for management workflows
|
||||||
|
- **NiceGUI (gallery_app.py, port 8080)**: Modern gallery interface for image tagging and pairing operations
|
||||||
|
- **Shared Backend**: Both UIs use `SorterEngine` (engine.py) and the same SQLite database
|
||||||
|
|
||||||
|
### Core Components
|
||||||
|
|
||||||
|
| File | Purpose |
|
||||||
|
|------|---------|
|
||||||
|
| `engine.py` | Static `SorterEngine` class - all DB operations, file handling, image compression |
|
||||||
|
| `gallery_app.py` | NiceGUI gallery with `AppState` class for centralized state management |
|
||||||
|
| `app.py` | Streamlit entry point, loads tab modules |
|
||||||
|
| `tab_*.py` | Independent tab modules for each workflow |
|
||||||
|
|
||||||
|
### Database
|
||||||
|
SQLite at `/app/sorter_database.db` with tables: profiles, folder_ids, categories, staging_area, processed_log, folder_tags, profile_categories, pairing_settings.
|
||||||
|
|
||||||
|
### Tab Workflows
|
||||||
|
1. **Time-Sync Discovery** - Match images by timestamp across folders
|
||||||
|
2. **ID Review** - Resolve ID collisions between target/control folders
|
||||||
|
3. **Unused Archive** - Manage rejected image pairs
|
||||||
|
4. **Category Sorter** - One-to-many categorization
|
||||||
|
5. **Gallery Staged** - Grid-based tagging with Gallery/Pairing dual modes
|
||||||
|
|
||||||
|
## Key Patterns
|
||||||
|
|
||||||
|
- **ID Format**: `id001_`, `id002_` (zero-padded 3-digit prefix)
|
||||||
|
- **Staging Pattern**: Two-phase commit (stage → commit) with undo support
|
||||||
|
- **Image Formats**: .jpg, .jpeg, .png, .webp, .bmp, .tiff
|
||||||
|
- **Compression**: WebP with ThreadPoolExecutor (8 workers)
|
||||||
|
- **Permissions**: chmod 0o777 applied to committed files
|
||||||
|
- **Default Paths**: `/storage` when not configured
|
||||||
BIN
__pycache__/engine.cpython-312.pyc
Normal file
BIN
__pycache__/engine.cpython-312.pyc
Normal file
Binary file not shown.
BIN
__pycache__/gallery_app.cpython-312.pyc
Normal file
BIN
__pycache__/gallery_app.cpython-312.pyc
Normal file
Binary file not shown.
1877
gallery_app.py
Normal file
1877
gallery_app.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,2 +1,4 @@
|
|||||||
streamlit
|
streamlit
|
||||||
Pillow
|
Pillow
|
||||||
|
nicegui
|
||||||
|
requests
|
||||||
25
start.sh
Executable file
25
start.sh
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# NiceSorter - Start Script
|
||||||
|
# Runs the NiceGUI gallery interface on port 8080
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Navigate to app directory if running in container
|
||||||
|
if [ -d "/app" ]; then
|
||||||
|
cd /app
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install dependencies if requirements.txt exists
|
||||||
|
if [ -f "requirements.txt" ]; then
|
||||||
|
echo "📦 Installing dependencies..."
|
||||||
|
pip install --no-cache-dir -q -r requirements.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Initialize database
|
||||||
|
echo "🗄️ Initializing database..."
|
||||||
|
python3 -c "from engine import SorterEngine; SorterEngine.init_db()"
|
||||||
|
|
||||||
|
# Start NiceGUI
|
||||||
|
echo "🚀 Starting NiceSorter on http://0.0.0.0:8080"
|
||||||
|
exec python3 gallery_app.py
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user