Skip to content

feat(ui-plugins): add Photo Date Organizer (photo-date-organizer) - #258

Open
ppppp2005-p wants to merge 11 commits into
zai-org:mainfrom
ppppp2005-p:feat/photo-date-organizer
Open

ppppp2005-p wants to merge 11 commits into
zai-org:mainfrom
ppppp2005-p:feat/photo-date-organizer

Conversation

@ppppp2005-p

Copy link
Copy Markdown

Plugin type (required) / 插件类型(必填)

  • UI Plugin / 是 UI 插件 — provides MCP Apps interactive pages / 提供 MCP Apps 交互页面
  • Standard plugin / 普通插件(非 UI)
  • Not applicable / 不适用

Affected plugin name(s) / 涉及的插件名称:photo-date-organizer (UI Plugin, new)

What / 改动内容

New community UI plugin Photo Date Organizer / 照片按日期整理: Sort a messy folder of phone photos, screenshots and videos into year/month folders by the date they were taken — read from EXIF, the video's creation time or a date in the file name, with the file time only as a last resort — and optionally rename them to 20261002_091500.jpg. Every file shows where its date came from, you can correct any date, and a move can be undone. Runs locally; no API keys.

  • Tools: photos_open, photos_edit, photos_status, photos_export (all share one side panel: file picker, settings, issue list, editable table, preview, export).
  • Real dates first: EXIF DateTimeOriginal for JPEG/HEIC/TIFF/DNG, the MP4/MOV creation time, then dates in names (IMG_20261103_101522, Screenshot 2026-11-05 at 10.22.31, 微信图片_20261106, mmexport timestamps), and only then the file time — flagged, because copying changes it.
  • Layouts: 2026/2026-10, 2026-10, 2026/10, 2026/2026-10-02, 2026-10-02 or no folders; keep names, rename to the date, or date + original name.
  • Fix in the table: type a date in any format like 2024-02-02 12:00 or 2024年2月2日; the source becomes “manual”. Camera make/model is shown.
  • Safe: same-name files get -2, -3; nothing is overwritten. Move mode can be undone; copy mode writes into the plugin's output and leaves the originals alone.
  • Plan first: organize-plan.csv lists each file, its date, the source and its destination.
  • Scope (v0.1):
    • Dates are the camera's local time; time zones are not converted (videos use the computer's time zone).
    • No face, place or content grouping; GPS is read but not used for folders in v0.1.
    • One folder (with subfolders) and up to 20,000 files per project; RAW formats other than DNG fall back to the name or file time.
  • Local only; writes only photo-date-organizer/ in the workspace. Workspace paths are checked so symlinks cannot lead reads or writes outside the workspace (regression test included).
  • Tests: vitest unit + MCP tool tests on real sample files, and a browser e2e with the official AppBridge host (panel → open → edit → export).

A ZCode Desktop demo recording is attached in the comments. / ZCode 桌面版演示录屏见评论。

Self-check / 自查清单

  • Plugin name is unique kebab-case; new external plugin directory is external_plugins/<name>/
  • Usage category is set (productivity)
  • Plugin type and affected names are declared above
  • version 0.1.0 in both plugin.json and marketplace.json
  • README.md (EN) and README_CN.md (中文) both provided and equivalent
  • description_i18n has both en and zh-CN
  • No secrets, machine-specific paths, or private dependencies
  • Model/API/network dependencies documented
  • python3 scripts/validate.py and python3 scripts/build_dist.py pass locally
  • Exercised in ZCode Desktop (ZCode 4.0.0, macOS arm64: installed from a local marketplace, organised the folder p100/photo-date-organizer/手机相册 into year/month folders (8 files moved, plan + undo log); demo video in the comments)

@ppppp2005-p

Copy link
Copy Markdown
Author

ZCode desktop demo (ZCode 4.0.0, macOS arm64)

photo-date-organizer-demo.mp4

Flow shown:

  1. Installed photo-date-organizer from a local marketplace built from this PR's branch.
  2. Asked ZCode to organise the folder p100/photo-date-organizer/手机相册 (phone photos, a camera JPG, a WeChat mmexport file, a screenshot, a video and a PNG with no date) and export (photos_open, photos_edit only if something blocks, photos_export).
  3. photos_open planned 8 files into 5 month folders (2026/2026-10 layout, keep names, move with undo; 3 dates from EXIF, the rest from file names, 1 from the file time). The side panel (照片按日期整理) shows the settings, the summary chips and 1 warning: 无日期.png has no date in the file or its name, so the file time is used (it may be the copy time).
  4. photos_export moved the 8 files into 2025/2025-11, 2025/2025-12, 2026/2026-09, 2026/2026-10 and 2026/2026-11, and wrote photo-date-organizer/手机相册/organize-plan.csv and organize-log.csv (the log is what undo uses). The last card is the final state.

演示流程:本地 marketplace 安装 → photos_open(8 个文件按 EXIF / 文件名 / 文件时间分到 5 个月份文件夹,1 条提醒:无日期.png 只能用文件时间)→ photos_export 实际移动文件并写出计划和可撤销日志;面板显示设置、汇总和提醒。

@panda920

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants