Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

docs: align Windows desktop path and repository name

Peach local maintenance9533aa142779
diff --git a/.claude/skills/peach-cross-platform/SKILL.md b/.claude/skills/peach-cross-platform/SKILL.md
index a991221bf..62ec61b3d 100644
--- a/.claude/skills/peach-cross-platform/SKILL.md
+++ b/.claude/skills/peach-cross-platform/SKILL.md
@@ -33,7 +33,7 @@ description: 在 macOS 上开工、改动路径解析或挂载判定、遇到 gi
用 `PEACH_DRIVE_MAP=R=/mnt/res,B=/mnt/115` 覆盖;数据目录用 `PEACH_DATA_ROOT`。
CloudDrive 在 Windows 是盘符、在 macOS 是 macFUSE 挂载点,这层不是可选优化。
-运行目录不跟着媒体盘符走。Windows 目标根是 `C:\Users\longm\Peach`,macOS 是
+运行目录不跟着媒体盘符走。Windows 目标根是 `C:\Users\longm\Desktop\peach`,macOS 是
`~/Desktop/lmd.gg/peach`;Windows 仍在外置 `R:` 上运行,尚未完成迁移。外置盘以后只承担媒体资源。
## 三条只在 Windows 成立的假设
@@ -88,7 +88,7 @@ macOS 的 FFmpeg 走 PATH(`brew install ffmpeg`);Windows 的 FFmpeg bundle
## 代码同步
-代码在私有仓库 `longmeidao/peach`(`origin`),两台机器手动 push/pull,**不自动推送**。
+代码在私有仓库 `longmeidao/peach-app`(`origin`),两台机器手动 push/pull,**不自动推送**。
开工前先 `sh scripts/sync_status.sh`:落后远端就先 `git pull --rebase`,别在旧代码上接着
写;账本是另一条链路(`peach.sync`),同一个脚本会一并报告。
diff --git a/AGENTS.md b/AGENTS.md
index 5a54c10c6..b47a998c0 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -54,7 +54,7 @@
## 工作规则
-- `peach-app` is the only GitHub-synced tree. `peach-data`, `.venv`, build output, worktree directories, media and CloudDrive mounts never enter Git. Windows is still on legacy external `R:\peach-app`/`R:\peach-data` and must migrate to internal `C:\Users\longm\Peach`; macOS is already local. The external disk's target role is only `R:\media`/`/Volumes/RESOURCES/media`; see ADR-0017.
+- `peach-app` is the only GitHub-synced tree. `peach-data`, `.venv`, build output, worktree directories, media and CloudDrive mounts never enter Git. Windows is still on legacy external `R:\peach-app`/`R:\peach-data` and must migrate to internal `C:\Users\longm\Desktop\peach`; macOS is already local. The external disk's target role is only `R:\media`/`/Volumes/RESOURCES/media`; see ADR-0017.
- Ledger paths are always written in the Windows shape (`R:\Media\...`, `A:\...`, `B:\...`). `src/peach/platform.py` translates them to local mounts at read time; never rewrite the ledger to a POSIX shape, and never write `asset.path` from macOS.
- `peach-data/database/ledger.db` is the truth store. Tests use temporary databases only. A real migration requires a SQLite backup and before/after count checks; follow `peach-ledger-write` before any real write.
- The project is an early personal project: aggressively remove obsolete code and compatibility layers when the replacement is tested. Do not preserve dead interfaces merely for history; Git is the archive.
diff --git a/README.md b/README.md
index ff1c937f7..97b3efe64 100644
--- a/README.md
+++ b/README.md
@@ -16,9 +16,9 @@ macOS 已完成本机化;Windows 截至 2026-08-21 仍从外置盘的 `R:\peac
| 角色 | Windows 目标(待迁移) | macOS 当前 |
|---|---|---|
-| 项目代码 | `C:\Users\longm\Peach\peach-app` | `~/Desktop/lmd.gg/peach/peach-app` |
-| 运行数据 | `C:\Users\longm\Peach\peach-data` | `~/Desktop/lmd.gg/peach/peach-data` |
-| 并行 worktree | `C:\Users\longm\Peach\peach-worktrees` | `~/Desktop/lmd.gg/peach/peach-worktrees` |
+| 项目代码 | `C:\Users\longm\Desktop\peach\peach-app` | `~/Desktop/lmd.gg/peach/peach-app` |
+| 运行数据 | `C:\Users\longm\Desktop\peach\peach-data` | `~/Desktop/lmd.gg/peach/peach-data` |
+| 并行 worktree | `C:\Users\longm\Desktop\peach\peach-worktrees` | `~/Desktop/lmd.gg/peach/peach-worktrees` |
| 本地媒体 | `R:\media` | `/Volumes/RESOURCES/media` |
| 115(账本写 `B:\`) | `B:\` | `~/Desktop/IMSL/115` |
| PikPak(账本写 `A:\`) | `A:\` | `~/Desktop/IMSL/Pikpak` |
@@ -223,7 +223,7 @@ SAN 里的局域网 IP 会随 DHCP 变化失效,**但不需要人去管,也
### 两台机器怎么保持一致
-- **代码**走私有 GitHub 仓库 `longmeidao/peach`(`origin`)。阶段性任务完成、测试全绿且无报错
+- **代码**走私有 GitHub 仓库 `longmeidao/peach-app`(`origin`)。阶段性任务完成、测试全绿且无报错
时直接推送;测试有失败,或改动涉及真实 ledger 写入、不可逆删除、生产入口、凭据时先确认。
开工前跑一条命令看两边差了多少,别在旧代码上接着写:
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index f3059e4bf..c1ebda051 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -43,7 +43,7 @@ Windows 与 macOS 各自在内置盘持有代码、`peach-data`、`.venv` 和 wo
账本走 Peach 单写者复制,其他运行数据按 durable artifact 与本机状态拆分,禁止整体同步。
Windows 独立环境尚未迁移完成,见 ADR-0017 与 `docs/STATUS.md`。
-`peach-data` 与代码仓库刻意分离(Windows 目标为 `C:\Users\longm\Peach\peach-data`,
+`peach-data` 与代码仓库刻意分离(Windows 目标为 `C:\Users\longm\Desktop\peach\peach-data`,
macOS 为 `~/Desktop/lmd.gg/peach/peach-data`,由 `PEACH_DATA_ROOT` 覆盖):
- `database/`:SQLite 真相库。本地是工作副本,血缘记在同目录的 `ledger.db.sync.json`
diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md
index bb0b3414b..34e910b39 100644
--- a/docs/HANDOFF.md
+++ b/docs/HANDOFF.md
@@ -179,7 +179,7 @@ Claude 的 `.claude/settings.json` 已配置 Stop、StopFailure、SessionEnd hoo
## 运行与部署
-- 当前 Windows 日常入口仍是外置盘 `R:\peach-app` 下的 Startup `Peach.lnk`;目标入口位于 `C:\Users\longm\Peach\peach-app`,迁移后仍只保留一个 Startup 托盘入口。
+- 当前 Windows 日常入口仍是外置盘 `R:\peach-app` 下的 Startup `Peach.lnk`;目标入口位于 `C:\Users\longm\Desktop\peach\peach-app`,迁移后仍只保留一个 Startup 托盘入口。
- Windows 发布入口使用 `scripts/build_windows.ps1`:先用 `scripts/generate_brand_assets.py` 从原始附件生成正方形 `resources/peach-logo.png` 和多尺寸 `resources/peach.ico`,再构建单一 `dist/Peach/Peach.exe`。无参数运行托盘,`serve`/`migrate` 运行 CLI;桌面快捷方式由 `scripts/create_desktop_shortcut.ps1` 创建,图标使用 `Peach.exe,0`,行为与 FlowLens 的快捷方式一致;Startup 安装仍由 `scripts/manage_tray_startup.ps1` 负责。
- `dist/Peach/Peach.exe` 是本机打包入口,不是可移动的独立发行版:托盘只打包了自己,服务进程仍由项目 venv 的 `peach.exe` 承担(`_peach_executable()` 从 exe 位置逐级向上找 `.venv\Scripts\peach.exe`)。脱离同一台机器的项目 `.venv` 复制不会工作,不要按「单文件绿色版」对外描述。
- 托盘单击打开 HTTPS;菜单提供状态、重启、日志、更新检查和退出。托盘只终止自己创建的 Peach 服务进程。
diff --git a/docs/STATUS.md b/docs/STATUS.md
index 1e4e08c7c..d332fea03 100644
--- a/docs/STATUS.md
+++ b/docs/STATUS.md
@@ -6,7 +6,7 @@
- 生产入口:Windows 当前用户 Startup 中的 `Peach.lnk`,启动 `R:\peach-app\dist\Peach\Peach.exe`(无参数托盘模式)。当前版本 `0.6.1`。
- Windows **还没有**内置盘独立环境:代码、`peach-data`、venv、构建产物和 worktree 仍在外置
- `R:`。目标是迁到 `C:\Users\longm\Peach`,外置盘只保留 `R:\media`;截至本状态尚未实施,
+ `R:`。目标是迁到 `C:\Users\longm\Desktop\peach`,外置盘只保留 `R:\media`;截至本状态尚未实施,
不能写成已完成。见 ADR-0017。
- HTTP:`0.0.0.0:80`;HTTPS:`192.168.50.162:443`。`peach.local` 是唯一正式局域网名称,发布为 `192.168.50.162`。
- mDNS 使用 Python zeroconf 的全合格网卡监听;生产显式固定发布地址,避免隧道网卡误选。没有发布 `lmd-dst.local`。
diff --git a/docs/adr/0017-dual-host-local-runtime-and-sync-boundaries.md b/docs/adr/0017-dual-host-local-runtime-and-sync-boundaries.md
index b667fc06b..2ecf6bbb1 100644
--- a/docs/adr/0017-dual-host-local-runtime-and-sync-boundaries.md
+++ b/docs/adr/0017-dual-host-local-runtime-and-sync-boundaries.md
@@ -18,7 +18,7 @@ Peach 的目标是 Windows 与 macOS 各自拥有内置盘上的代码、运行
### 每台机器独立持有运行环境
-- Windows 目标根目录为 `C:\Users\longm\Peach`:`peach-app`、`peach-data`、
+- Windows 目标根目录为 `C:\Users\longm\Desktop\peach`:`peach-app`、`peach-data`、
`peach-worktrees` 均位于内置盘。迁移完成前,`R:\peach-app`、`R:\peach-data` 只是旧运行态
和迁移来源,不是目标路径。
- macOS 保持 `~/Desktop/lmd.gg/peach/{peach-app,peach-data,peach-worktrees}`。
@@ -73,8 +73,8 @@ Peach 的目标是 Windows 与 macOS 各自拥有内置盘上的代码、运行
## 实施清单
1. 将当前 `master` 推到私有 GitHub;在 Windows 内置盘克隆到
- `C:\Users\longm\Peach\peach-app`,建立本机 `.venv` 并跑 `scripts\test.ps1`。
-2. 在 Windows 建立 `C:\Users\longm\Peach\peach-data` 与 `peach-worktrees`,把
+ `C:\Users\longm\Desktop\peach\peach-app`,建立本机 `.venv` 并跑 `scripts\test.ps1`。
+2. 在 Windows 建立 `C:\Users\longm\Desktop\peach\peach-data` 与 `peach-worktrees`,把
`PEACH_DATA_ROOT`、构建产物、桌面/Startup 快捷方式和日志路径切到内置盘。
3. 停止两端 Peach,确认当前账本世代一致并备份;用 SQLite backup API 把权威账本播种到
Windows 本机副本,核对迁移版本、计数、完整性和外键。