Skip to content

feat(ui-plugins): add Printable Calendar (printable-calendar) - #291

Open
ppppp2005-p wants to merge 11 commits into
zai-org:mainfrom
ppppp2005-p:feat/printable-calendar
Open

ppppp2005-p wants to merge 11 commits into
zai-org:mainfrom
ppppp2005-p:feat/printable-calendar

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) / 涉及的插件名称:printable-calendar (UI Plugin, new)

What / 改动内容

New community UI plugin Printable Calendar / 可打印日历: Print a calendar for the year with your holidays and events already written in. Get a monthly calendar with a page per month and big boxes to write in, and a year-at-a-glance page. Optionally pick a list of dates — holidays, make-up working days, birthdays, trips, deadlines — or type holidays straight into the settings. Choose the year and months, Monday or Sunday start, A4 or Letter, Chinese and English labels, week numbers and your colour. Runs locally; no design service or API keys.

  • Tools: cal_open, cal_edit, cal_status, cal_export (all share one side panel: file picker, settings, issue list, editable table, preview, export).
  • Monthly pages: big boxes with your events written in, weekends and holidays shaded, 休/班 tags, overflow marked.
  • Year at a glance: all months on one page with holidays highlighted, event days marked and a list of dates below.
  • Your dates: pick a CSV/Excel of 日期, 结束日期, 事项, 类型 (活动/假期/补班), 颜色 — or type holidays in the settings.
  • Any span: choose the year, start month and up to 24 months.
  • Print options: A4 or Letter, portrait or landscape, Monday or Sunday start, ISO week numbers, Chinese/English labels, accent colour.
  • Scope (v0.1):
    • Public holidays aren't built in — enter them from your official holiday notice (examples are marked in the sample).
    • No lunar calendar dates in v0.1.
  • Local only; writes only printable-calendar/ 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, opened p100/printable-calendar/events.csv and exported the monthly and year calendars; demo video in the comments)

@ppppp2005-p

Copy link
Copy Markdown
Author

ZCode desktop demo (ZCode 4.0.0, macOS arm64)

printable-calendar-demo.mp4

Flow shown:

  1. Installed printable-calendar from a local marketplace built from this PR's branch.
  2. Asked ZCode to open p100/printable-calendar/events.csv with the title 青禾 2027, fix anything that blocks the export, then export (cal_open, cal_edit only if needed, cal_export).
  3. cal_open read 13 rows (7 events, 5 holidays and 1 make-up workday) with no issues, so no edits were needed. The side panel (可打印日历) shows the settings (year 2027, start month, 12 months, week starts on Monday, A4, automatic orientation, Chinese + English labels, title, theme colour, week numbers, extra holidays) and the chips (12 months, 7 events, 5 holidays). The model also pointed out that four holidays in the sample are marked (示例) and should be checked against the official 2027 schedule before printing.
  4. cal_export wrote printable-calendar/events/calendar-2027-monthly.pdf (one page per month) and calendar-2027-year.pdf (a year at a glance). The second image is January from the monthly PDF: 元旦 on Friday 1 January is marked 休, weekends are shaded, and the events (项目启动会 on the 15th, 深圳出差 from the 20th to the 22nd) appear in their cells. The recording ends just as the answer finishes streaming.

演示流程:本地 marketplace 安装 → cal_open(13 行:7 个日程、5 个假期、1 个补班,无问题)→ cal_export 生成按月 PDF 和年历 PDF;第二张图是 2027 年 1 月(元旦标「休」、周末着色、多日出差逐日显示)。

@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