sam-4screen-desktop 2026-9-9:11:54:8
This commit is contained in:
220
200 projects/Tools Software WebUI/Photo Consolidation Plan.md
Normal file
220
200 projects/Tools Software WebUI/Photo Consolidation Plan.md
Normal file
@@ -0,0 +1,220 @@
|
||||
---
|
||||
created: 2026-05-28
|
||||
modified: 2026-05-28
|
||||
type: note
|
||||
tags: [photos, consolidation, archive]
|
||||
aliases: [photo-consolidation]
|
||||
---
|
||||
|
||||
# Photo Consolidation Plan
|
||||
|
||||
> Consolidating all photo collections across drives into a single clean archive.
|
||||
|
||||
---
|
||||
|
||||
## Principle
|
||||
|
||||
**Do not touch Immich** — it manages its own library at `/mnt/hd/immich/` (40K photos, Dec 2024 – Jan 2025). All other photos get consolidated into one archive.
|
||||
|
||||
---
|
||||
|
||||
## Current State — All Photo Collections
|
||||
|
||||
### Immich Library — DO NOT TOUCH
|
||||
|
||||
| Machine | Location | Photos | Period | Organized |
|
||||
|---------|----------|--------|--------|-----------|
|
||||
| .35 | `/mnt/hd/immich/` | 40,769 | Dec 2024 – Jan 2025 | Immich-managed |
|
||||
|
||||
### Collections to Consolidate
|
||||
|
||||
| # | Collection | Machine | Path | Photos | Period | Organized | Duplicate Of |
|
||||
|--|-----------|---------|------|--------|--------|-----------|-------------|
|
||||
| **1** | **sorted_pictures_holder** | .13 | `/mnt/data/ALL_TRANFERS/Pictures/sorted_pictures_holder/` | **31,279** | **1990–2023** | **✅ Year → Month** | Master collection |
|
||||
| **2** | **temp_transfer** | .13 | `/mnt/data/ALL_TRANFERS/Pictures/temp_transfer/` | ~? | 2024 | ❌ By event name | Unique (latest photos) |
|
||||
| **3** | **PICTURES_GROUPED_SUBJECT_OLD** | .13 | `/mnt/data/ALL_TRANFERS/Pictures/PICTURES_GROUPED_SUBJECT_OLD/` | ~? | 2005–2012 | ❌ By topic | **= #7 Back Up drive** |
|
||||
| **4** | **Integral300 recovery** | .27 mounted | `/run/media/sam/Integral300/` | 30,747 | — | Mixed | **= #5 SmartDrive + #1** |
|
||||
| **5** | **SmartDrive backup** | .27 | `/run/media/sam/SmartDrive/integral300_backup_20260305/` | 30,747 | — | Mixed | **= #4 recovery img** |
|
||||
| **6** | **Photos-001 (1-4)** | .13 | `/mnt/data/ALL_TRANFERS/Pictures/Photos-001 (1-4)/` | ~119 | May–Jun 2023 | ❌ Raw dumps | Unique |
|
||||
| **7** | **Back Up drive photos** | .27 | `/mnt/backup/old_photos_backup/pictures/` | ~? | 2005–2011 | ❌ By topic | **= #3** |
|
||||
| **8** | **sorted_pictures/2019** | .13 | `/mnt/data/ALL_TRANFERS/Pictures/sorted_pictures/` | ~? | 2019 | ✅ Year only | Might be in #1 already |
|
||||
| **9** | **sam rolfe/previous years** | .13 | `/mnt/data/ALL_TRANFERS/sam rolfe/previous years/` | ~? | 2018–2019 | ❌ Mixed | Unique? |
|
||||
| **10** | **grandas_wake** | .13 | `/mnt/storage/Users/Sam Rolfe/Desktop/grandas_wake/recent photos sams/` | ~7 | — | ❌ | Unique? |
|
||||
|
||||
### Duplicate Summary
|
||||
|
||||
| Group | Collections | Action |
|
||||
|-------|------------|--------|
|
||||
| **A — sorted_pictures_holder** | #1 only (on .13) | **Keep as master** — best organized |
|
||||
| **B — PICTURES_GROUPED_SUBJECT_OLD** | #3 (#7 is same) | **Keep one copy, delete the other** |
|
||||
| **C — Integral300** | #4 (#5 is same) | **Delete SmartDrive copy** — recovery .img is source of truth |
|
||||
| **D — temp_transfer + misc** | #2, #6, #8, #9, #10 | **Merge into archive** — these are unique |
|
||||
|
||||
---
|
||||
|
||||
## Proposed Archive Structure
|
||||
|
||||
### Target Location: `.13` — `/mnt/ubuntu_storage_3TB/archive/photos/`
|
||||
|
||||
Moved from `/mnt/data/` (ran out of space — 1.9T full). Ubuntu storage has **2.2T free**.
|
||||
|
||||
```
|
||||
/mnt/ubuntu_storage_3TB/archive/photos/
|
||||
├── by_date/sorted_pictures_holder/ ← 373G (year→month, 1990–2023)
|
||||
├── by_subject/PICTURES_GROUPED_SUBJECT_OLD/ ← 69G (topic-organized)
|
||||
├── phone_dumps/Photos-001 (1-4)/ ← ~119 phone photos
|
||||
└── temp_transfer/ ← 2024 events (unsorted)
|
||||
```
|
||||
|
||||
```
|
||||
/mnt/data/archive/photos/
|
||||
│
|
||||
├── by_date/ ← The master date-organized collection
|
||||
│ ├── 1990/
|
||||
│ │ └── 01-Jan/
|
||||
│ ├── 2003/
|
||||
│ ├── 2004/
|
||||
│ ├── ... (years 2005–2023)
|
||||
│ ├── 2023/
|
||||
│ │ ├── 02-Feb/
|
||||
│ │ ├── 03-Mar/
|
||||
│ │ ├── 04-Apr/
|
||||
│ │ └── 05-May/
|
||||
│ └── 2024/ ← From temp_transfer (sorted into months)
|
||||
│ ├── 03-Mar/ → footy_round_5_2024, etc.
|
||||
│ ├── 04-Apr/ → fin round 7, etc.
|
||||
│ └── ...
|
||||
│
|
||||
├── by_subject/ ← Topic-based albums (no clear dates)
|
||||
│ ├── baby_harry/
|
||||
│ ├── wedding/
|
||||
│ ├── grandma_funeral/
|
||||
│ ├── bruges/
|
||||
│ ├── byron_bay/
|
||||
│ ├── footy/ ← All footy games combined
|
||||
│ ├── dad_80th/
|
||||
│ └── ... (others from PICTURES_GROUPED_SUBJECT_OLD)
|
||||
│
|
||||
└── phone_dumps/ ← Raw phone exports (keep original names)
|
||||
└── pixel_6_pro_2023/
|
||||
├── 2023-05/
|
||||
└── 2023-06/
|
||||
```
|
||||
|
||||
### Explanation
|
||||
|
||||
| Folder | Source | Rationale |
|
||||
|--------|--------|-----------|
|
||||
| **`by_date/`** | `sorted_pictures_holder/` + `temp_transfer/` (sorted into dates) | **Primary** — date-organized is the most useful for finding photos. `temp_transfer` events will be sorted into year/month folders |
|
||||
| **`by_subject/`** | `PICTURES_GROUPED_SUBJECT_OLD/` | Secondary — some photos make more sense grouped by event (weddings, funerals, trips) |
|
||||
| **`phone_dumps/`** | `Photos-001 (1-4)/` | Raw exports — useful to keep original PXL_ filenames for reference |
|
||||
|
||||
---
|
||||
|
||||
## Consolidation Steps
|
||||
|
||||
### Step 1 — Delete Obvious Duplicates
|
||||
|
||||
```bash
|
||||
# These are identical to PICTURES_GROUPED_SUBJECT_OLD on .13:
|
||||
# Delete from .27 Back Up drive after confirming .13 copy exists
|
||||
# /mnt/backup/old_photos_backup/pictures/ ← DELETE SAFELY
|
||||
|
||||
# These are already extracted and match recovery .img:
|
||||
# Delete SmartDrive integral300_backup_20260305/ ← DELETE SAFELY
|
||||
```
|
||||
|
||||
### Step 2 — Build the Archive (on .13)
|
||||
|
||||
```bash
|
||||
# Create archive structure
|
||||
mkdir -p /mnt/data/archive/photos/{by_date,by_subject,phone_dumps}
|
||||
|
||||
# A) Copy sorted_pictures_holder as the foundation of by_date/
|
||||
cp -a /mnt/data/ALL_TRANFERS/Pictures/sorted_pictures_holder/ \
|
||||
/mnt/data/archive/photos/by_date/
|
||||
|
||||
# B) Copy subject-organized albums into by_subject/
|
||||
cp -a /mnt/data/ALL_TRANFERS/Pictures/PICTURES_GROUPED_SUBJECT_OLD/* \
|
||||
/mnt/data/archive/photos/by_subject/
|
||||
|
||||
# C) Copy phone dumps
|
||||
cp -a "/mnt/data/ALL_TRANFERS/Pictures/Photos-001 (1)/" \
|
||||
/mnt/data/archive/photos/phone_dumps/2023-05/
|
||||
cp -a "/mnt/data/ALL_TRANFERS/Pictures/Photos-001 (2)/" \
|
||||
/mnt/data/archive/photos/phone_dumps/2023-05/
|
||||
# ... etc
|
||||
|
||||
# D) Copy temp_transfer events — needs manual sorting into by_date/2024/
|
||||
cp -a /mnt/data/ALL_TRANFERS/Pictures/temp_transfer/ \
|
||||
/mnt/data/archive/photos/temp_transfer_to_sort/
|
||||
```
|
||||
|
||||
### Step 3 — Sort `temp_transfer` into `by_date/2024/`
|
||||
|
||||
The folder needs manual review. Photos can be filed into:
|
||||
|
||||
```
|
||||
by_date/2024/
|
||||
├── 03-Mar/ ← footy_round_5_2024, fin round 7
|
||||
├── 04-Apr/ ← fin round 8, harry round 8
|
||||
├── 05-May/ ← harry round 9
|
||||
├── 06-Jun/ ← whatever dates are in there
|
||||
└── ...
|
||||
```
|
||||
|
||||
Each file has timestamps — use `exiftool` or file timestamps to determine the right month.
|
||||
|
||||
### Step 4 — Verify & Clean Up
|
||||
|
||||
1. Run `du -sh` on the archive to confirm all photos arrived
|
||||
2. Spot-check a few folders with `ls`
|
||||
3. Delete source directories from ALL_TRANFERS **only after confirmed**
|
||||
4. Unmount recovery .img + delete SmartDrive copy
|
||||
|
||||
---
|
||||
|
||||
## Additional Photo Sources to Check
|
||||
|
||||
| Source | Where | Action |
|
||||
|--------|-------|--------|
|
||||
| .35 My Passport `/mnt/hd/data/` | .35 | Check if any photos exist in the data folder |
|
||||
| Immich database | .35 | Already managed — leave alone |
|
||||
| Integral300 recovery .img | .27 `/mnt/tempbackup/` | Data is in the archive already — keep for now? |
|
||||
| **Obsidian attachments** | .27 `~/obsidian/` | These are notes, not photos — keep in vault |
|
||||
|
||||
---
|
||||
|
||||
## What to Keep vs Delete After Consolidation
|
||||
|
||||
| Item | Keep? | Reason |
|
||||
|------|-------|--------|
|
||||
| `sorted_pictures_holder/` on .13 | 🗑️ Delete | Moved to archive |
|
||||
| `PICTURES_GROUPED_SUBJECT_OLD/` on .13 | 🗑️ Delete | Moved to archive |
|
||||
| `temp_transfer/` on .13 | 🗑️ Delete | Moved to archive |
|
||||
| `Photos-001 (1-4)/` on .13 | 🗑️ Delete | Moved to archive |
|
||||
| **old_photos_backup** on Back Up | ❌ Can't delete | NTFS read-only mount |
|
||||
| **SmartDrive integral300_backup** | ❌ Can't delete | Needs sudo (parent dir root-owned) |
|
||||
| **Recovery .img** (298G) | 🔵 Keep for now | Safety net — delete later |
|
||||
| **Immich** | ✅ Keep | Live service |
|
||||
| `sam rolfe/previous years/` on .13 | ❓ Check | Mixed |
|
||||
| `grandas_wake/` on .13 | ❓ Check | ~7 photos |
|
||||
| `.27` Back Up drive | ❓ Repurpose | 158G freed eventually |
|
||||
|
||||
## Archive Built — 2026-05-28
|
||||
|
||||
**Completed:** Copied all photo collections to `.13` `/mnt/ubuntu_storage_3TB/archive/photos/` — 471G total, 2.2T free remaining
|
||||
|
||||
**Could not delete:**
|
||||
- SmartDrive backup needs `sudo rm -rf /mnt/smartdrive/integral300_backup_20260305/`
|
||||
- Back Up drive is NTFS read-only — need config change to remount rw
|
||||
|
||||
Both source copies on `.13` ALL_TRANFERS still exist — can be deleted after verification.
|
||||
|
||||
---
|
||||
|
||||
## Discarded Approaches
|
||||
|
||||
- **Merging into Immich**: Immich handles ingestion well, but it's running on .35 and the archive target is .13. Better to keep a simple filesystem-based archive.
|
||||
- **Deleting all duplicates immediately**: Too risky. Only delete after confirming the archive copy is intact.
|
||||
- **Keeping everything on .27**: The NVMe drive is fast but limited (490G free). .13 has more space (416G free on Data, 2.6T on ubuntu_storage_3TB) and is always-on.
|
||||
84
200 projects/Tools Software WebUI/Pi Dashboard.md
Normal file
84
200 projects/Tools Software WebUI/Pi Dashboard.md
Normal file
@@ -0,0 +1,84 @@
|
||||
# Pi Dashboard — Build Plan & Checklist
|
||||
|
||||
## Task Checklist
|
||||
|
||||
- [x] **Step 1: dashboard.ts extension** — written, tested, deployed to .13 (.51 offline)
|
||||
- [x] Event hooks: agent_start, agent_end, tool_call
|
||||
- [x] Write agent state JSON files atomically (`~/.pi/agent/dashboard/<session>.json`)
|
||||
- [x] Task tools: register_task, complete_task, list_tasks (todo.txt format)
|
||||
- [x] NTFY + Apprise notifications on completion
|
||||
- [x] Session name detection (tmux aware, configurable via PI_SESSION env)
|
||||
- [x] Tested: state files written correctly, no crashes
|
||||
- [x] **Step 2: Install companion tools** — Tuxedo (built from source via nix), Hunk (already available)
|
||||
- [x] Tuxedo: `/home/sam/bin/tuxedo` (NixOS-compatible nix build)
|
||||
- [x] Hunk: available via nix profile at `/etc/profiles/per-user/sam/bin/hunk`
|
||||
- [x] **Step 3: Go TUI viewer** — built and deployed to .27 and .13
|
||||
- [x] Initialize Go module at ~/src/pi-dashboard/ (Go 1.26)
|
||||
- [x] Local state file reader + TUI table rendering (Bubble Tea + Bubbles table)
|
||||
- [x] Keyboard controls: Enter (attach), d (Hunk), Tab (Tuxedo), r (refresh), q (quit)
|
||||
- [x] 2s polling loop
|
||||
- [x] Built to ~/bin/pi-dashboard (5.4MB static binary)
|
||||
- [x] Deployed to .13 via scp
|
||||
- [x] `--list` mode for non-TTY testing, `--help` for usage
|
||||
- [x] **Step 4: Cross-machine SSH pull**
|
||||
- [x] YAML config file at ~/.config/pi-dashboard.yaml (remotes: .13, .51)
|
||||
- [x] SSH remote state reader (shells out to `ssh user@host cat .../*.json`)
|
||||
- [x] Remote attach (local: `tmux attach`, remote: `ssh -t user@host tmux attach`)
|
||||
- [x] Viewer deployed to .13
|
||||
- [ ] **Step 5: Try Herdr**
|
||||
- [ ] Install Herdr via nix
|
||||
- [ ] Create test layout on WS 2
|
||||
- [ ] Run pi inside Herdr, verify dashboard picks it up
|
||||
- [ ] Evaluate migration vs keeping Zellij
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ pi sessions (each machine) │
|
||||
│ │
|
||||
│ pi (with dashboard.ts extension) │
|
||||
│ ├── agent_start → track: status, model, duration, tokens │
|
||||
│ ├── agent_end → notify: NTFY/Apprise + mark complete │
|
||||
│ ├── tool_call → track: last tool, tokens consumed │
|
||||
│ └── register_task / complete_task → write to todo.txt │
|
||||
│ │ │
|
||||
│ └── Writes to: │
|
||||
│ ~/.pi/agent/dashboard/<session>.json (agent state) │
|
||||
│ ~/.pi/agent/dashboard/tasks/todo.txt (task list) │
|
||||
│ │
|
||||
│ On agent_end / error: │
|
||||
│ └── curl → NTFY server (phone notification) │
|
||||
│ └── apprise → Slack/Telegram/email (configured routes) │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ pi-dashboard viewer (Go + Bubble Tea) │
|
||||
│ │
|
||||
│ Reads: ~/.pi/agent/dashboard/*.json (local + SSH remote) │
|
||||
│ Renders: agent status table with cost, duration, location │
|
||||
│ Controls: │
|
||||
│ Enter → tmux attach -t <session> (jump to agent) │
|
||||
│ d → hunk diff (review agent's worktree changes) │
|
||||
│ Tab → launch Tuxedo (task list in todo.txt) │
|
||||
│ r → force refresh │
|
||||
│ q → quit │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Key Decisions
|
||||
|
||||
| Decision | Choice | Why |
|
||||
|----------|--------|-----|
|
||||
| State transfer | SSH pull Phase 1 → HTTP collector on .13 Phase 2 | Zero infra to start, resilient later |
|
||||
| TUI framework | Go + Bubble Tea | Single binary, fast, portable |
|
||||
| Web UI | Phase 2, optional | SSH from Termux works for Phase 1 |
|
||||
| Task board | Use Tuxedo — don't build custom | Already polished with vim keys, phone capture |
|
||||
| Diff review | Use Hunk — don't build custom | Purpose-built for agent changeset review |
|
||||
| Notifications | Use NTFY + Apprise — don't build custom | Both already available, extension calls curl/apprise |
|
||||
| Polling | 2s intervals, no file watcher | Simple, no edge cases |
|
||||
| Session naming | pi-<role> (pi-work, pi-explore) | Consistent jump target |
|
||||
| Herdr | Try alongside, no special integration | Dashboard is multiplexer-agnostic |
|
||||
Reference in New Issue
Block a user