Enhance TagManagerGUI with bulk tagging features and linkage type management
This commit introduces significant enhancements to the TagManagerGUI, including the ability to add and manage bulk tags for all photos in a folder. Users can now link tags in bulk, with clear distinctions between single and bulk linkage types. The GUI also features improved handling of pending tag changes, allowing for better tracking and management of tag states. Additionally, the README has been updated to reflect these new functionalities and provide usage instructions.
This commit is contained in:
@@ -200,6 +200,7 @@ This GUI provides a file explorer-like interface for managing photo tags with ad
|
||||
- ✅ **Pending Tag System** - Add and remove tags with pending changes until saved
|
||||
- 🎯 **Visual Status Indicators** - Clear distinction between saved and pending tags
|
||||
- 🗑️ **Smart Tag Removal** - Remove both pending and saved tags with proper tracking
|
||||
- 🧩 **Linkage Types (Single vs Bulk)** - Tag links can be added per-photo (single) or for the entire folder (bulk). Bulk links appear on folder headers and follow special rules in dialogs
|
||||
|
||||
**📋 Available View Modes:**
|
||||
|
||||
@@ -224,6 +225,7 @@ Folder grouping applies across all views:
|
||||
- 📁 **Directory Grouping** - Photos grouped by their directory path
|
||||
- 🔽 **Expandable Folders** - Click folder headers to expand/collapse
|
||||
- 📊 **Photo Counts** - Shows number of photos in each folder
|
||||
- 🏷️ **Folder Bulk Tags** - Folder header shows bulk tags that apply to all photos in that folder (includes pending bulk adds not marked for removal)
|
||||
|
||||
**🔧 Column Resizing:**
|
||||
- 🖱️ **Drag to Resize** - Click and drag red separators between columns
|
||||
@@ -256,6 +258,8 @@ Folder grouping applies across all views:
|
||||
- 📊 **Batch Operations** - Select multiple tags for removal with checkboxes
|
||||
- 🔄 **Real-time Updates** - Tag display updates immediately when changes are made
|
||||
- 💾 **Save System** - All tag changes (additions and removals) saved atomically when "Save Tagging" is clicked
|
||||
- 🔁 **Bulk Overrides Single** - If a tag was previously added as single to some photos, adding the same tag in bulk for the folder upgrades those single links to bulk on save
|
||||
- 🚫 **Scoped Deletions** - Single-photo tag dialog can delete saved/pending single links only; Bulk dialog deletes saved bulk links or cancels pending bulk adds only
|
||||
- 🎯 **ID-Based Architecture** - Uses tag IDs internally for efficient, reliable operations
|
||||
- ⚡ **Performance Optimized** - Fast tag operations with minimal database queries
|
||||
|
||||
@@ -402,6 +406,7 @@ The tool uses SQLite database (`data/photos.db` by default) with these tables:
|
||||
- **faces** - Face encodings, locations, and quality scores
|
||||
- **tags** - Tag definitions (unique tag names)
|
||||
- **phototaglinkage** - Links between photos and tags (many-to-many relationship)
|
||||
- Columns: `linkage_id` (PK), `photo_id`, `tag_id`, `linkage_type` (INTEGER: 0=single, 1=bulk), `created_date`
|
||||
- **person_encodings** - Face encodings for each person (for matching)
|
||||
|
||||
### Database Schema Improvements
|
||||
@@ -451,6 +456,7 @@ sudo apt install -y cmake build-essential libopenblas-dev liblapack-dev libx11-d
|
||||
PunimTag/
|
||||
├── photo_tagger.py # Main CLI tool
|
||||
├── setup.py # Setup script
|
||||
├── run.sh # Convenience script (auto-activates venv)
|
||||
├── requirements.txt # Python dependencies
|
||||
├── README.md # This file
|
||||
├── gui_config.json # GUI window size preferences (created automatically)
|
||||
@@ -893,7 +899,16 @@ This is now a minimal, focused tool. Key principles:
|
||||
# Setup (one time)
|
||||
python3 -m venv venv && source venv/bin/activate && python3 setup.py
|
||||
|
||||
# Daily usage - Manual venv activation (GUI-ENHANCED)
|
||||
# Daily usage - Option 1: Use run script (automatic venv activation)
|
||||
./run.sh scan ~/Pictures --recursive
|
||||
./run.sh process --limit 50
|
||||
./run.sh identify --show-faces --batch 10
|
||||
./run.sh auto-match --show-faces
|
||||
./run.sh modifyidentified
|
||||
./run.sh tag-manager
|
||||
./run.sh stats
|
||||
|
||||
# Daily usage - Option 2: Manual venv activation (GUI-ENHANCED)
|
||||
source venv/bin/activate
|
||||
python3 photo_tagger.py scan ~/Pictures --recursive
|
||||
python3 photo_tagger.py process --limit 50
|
||||
|
||||
Reference in New Issue
Block a user