Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions external_plugins/printable-calendar/.zcode-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "printable-calendar",
"version": "0.1.0",
"description": "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.",
"description_i18n": {
"en": "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.",
"zh-CN": "打印一份已经写好节假日和你自己安排的日历。生成每月一页、格子够大可以手写的月历,以及一页看全年的年历。可以选一份日期清单——节假日、调休补班、生日、出差、截止日——也可以直接在设置里输入节假日。年份和月份、每周从周一还是周日开始、A4 或 Letter、中英文、周数和主题色都能选。在本地运行,不用设计服务,无需 API 密钥。"
},
"author": {
"name": "Penova",
"url": "https://github.com/ppppp2005-p"
},
"license": "MIT",
"keywords": [
"calendar",
"printable calendar",
"monthly calendar",
"year calendar",
"planner",
"holidays",
"pdf",
"日历",
"月历",
"年历",
"台历",
"可打印",
"节假日"
],
"skills": "skills",
"mcpServers": {
"printable-calendar": {
"type": "stdio",
"command": "node",
"args": [
"${ZCODE_PLUGIN_ROOT}/dist/server.mjs"
],
"cwd": "${ZCODE_PROJECT_DIR}",
"timeoutMs": 900000,
"env": {
"ZCODE_WORKSPACE_ROOT": "${ZCODE_PROJECT_DIR}"
}
}
},
"ui": {
"surfaces": [
{
"id": "editor",
"title": {
"zh-CN": "可打印日历",
"en-US": "Printable Calendar"
},
"icon": "calendar-days",
"server": "printable-calendar",
"resourceUri": "ui://printable-calendar/panel.html",
"availability": "session"
}
]
}
}
21 changes: 21 additions & 0 deletions external_plugins/printable-calendar/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Penova

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
51 changes: 51 additions & 0 deletions external_plugins/printable-calendar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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.

## Features

- **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.
- **Panel**: pick input files, adjust settings, see problems, edit any cell in the table, preview the result and export — all in the ZCode side panel. Edits are saved in `printable-calendar/<project>.project.json` and kept until you re-open the inputs.

## Usage

Ask the agent in ZCode Desktop:

- "Make a 2027 calendar with events.csv titled 青禾 2027"
- "Start weeks on Sunday, English labels, Letter paper"
- "Add 2027-06-09 Dragon Boat holiday and show week numbers"

## Tools

| Tool | Purpose |
|---|---|
| `cal_open` | Read the event list (optional) and preview the year. Opens the panel |
| `cal_edit` | Change settings, edit cells by row, add or remove rows |
| `cal_status` | Show the current rows, issues and summary |
| `cal_export` | Write calendar-<year>-monthly.pdf and calendar-<year>-year.pdf |

Output goes to `printable-calendar/<project>/` in the workspace.

## 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.

## Privacy, network and files

- **Everything runs locally.** No network, no uploads, no API keys or accounts.
- Reads only the files you choose. Writes only the `printable-calendar/` folder in the workspace. No hooks.

## Build and test (developers)

- Source: `ui-plugins/printable-calendar/`.
- Build: `pnpm install --frozen-lockfile && pnpm build`, then add `dist/local-marketplace` as a local source.
- Tests: `pnpm --filter @penova/plugin-printable-calendar test` and `test:e2e` (needs Chrome; sample files in `test/samples/`).

## Third-party components and licenses

MIT licensed (author: Penova). Bundled: ExcelJS (MIT), pdf-lib (MIT), fontkit (MIT), MCP SDK and ext-apps (MIT), zod (MIT); the full list is in `dist/THIRD_PARTY_NOTICES.txt`.
51 changes: 51 additions & 0 deletions external_plugins/printable-calendar/README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 可打印日历

打印一份已经写好节假日和你自己安排的日历。生成每月一页、格子够大可以手写的月历,以及一页看全年的年历。可以选一份日期清单——节假日、调休补班、生日、出差、截止日——也可以直接在设置里输入节假日。年份和月份、每周从周一还是周日开始、A4 或 Letter、中英文、周数和主题色都能选。在本地运行,不用设计服务,无需 API 密钥。

## 功能

- **月历**:格子大,写好你的安排,周末和假期加底色,带“休/班”标记,放不下会提示。
- **全年一页**:12 个月在一页,假期高亮、有安排的日子加标记,下方列出日期清单。
- **你的日期**:选一份含 日期、结束日期、事项、类型(活动/假期/补班)、颜色 的表格,或直接在设置里输入节假日。
- **任意时段**:选年份、起始月份,最多 24 个月。
- **打印选项**:A4 或 Letter,横向或纵向,周一或周日开始,ISO 周数,中英文,主题色。
- **面板**:在 ZCode 侧栏里选择输入文件、调整设置、查看问题、直接修改表格里的任意单元格、预览成品并导出。修改保存在 `printable-calendar/<项目>.project.json`,重新打开输入文件前一直保留。

## 使用方法

在 ZCode 桌面端对助手说:

- “用 events.csv 做 2027 年日历,标题 青禾 2027”
- “每周从周日开始,英文,Letter 纸”
- “加上 2027-06-09 端午假期,显示周数”

## 工具

| 工具 | 作用 |
|---|---|
| `cal_open` | 读取事件表(可选)并预览全年,并打开面板 |
| `cal_edit` | 修改设置、按行修改单元格、新增或删除行 |
| `cal_status` | 查看当前数据、问题和汇总 |
| `cal_export` | 导出 calendar-<年份>-monthly.pdf 和 calendar-<年份>-year.pdf |

导出文件写到工作区的 `printable-calendar/<项目>/` 文件夹。

## 范围(v0.1)

- 不内置法定节假日——请按官方通知填写(样例里的是示例)。
- v0.1 不显示农历。

## 隐私、网络与文件

- **全部在本地运行。** 不联网、不上传,不需要 API 密钥或账号。
- 只读取你选择的文件,只写入工作区的 `printable-calendar/` 文件夹。没有 Hook。

## 构建与测试(开发者)

- 源码:`ui-plugins/printable-calendar/`。
- 构建:`pnpm install --frozen-lockfile && pnpm build`,然后把 `dist/local-marketplace` 添加为本地来源。
- 测试:`pnpm --filter @penova/plugin-printable-calendar test` 和 `test:e2e`(需要 Chrome;样例文件在 `test/samples/`)。

## 第三方组件与许可证

MIT 许可(作者:Penova)。打包的组件:ExcelJS (MIT), pdf-lib (MIT), fontkit (MIT)、MCP SDK 与 ext-apps(MIT)、zod(MIT);完整列表见 `dist/THIRD_PARTY_NOTICES.txt`。
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: printable-calendar
description: 打印一份已经写好节假日和你自己安排的日历。生成每月一页、格子够大可以手写的月历,以及一页看全年的年历。可以选一份日期清单——节假日、调休补班、生日、出差、截止日——也可以直接在设置里输入节假日。年份和月份、每周从周一还是周日开始、A4 或 Letter、中英文、周数和主题色都能选。在本地运行,不用设计服务,无需 API 密钥。 用户提到“打印日历 / 月历 / 年历 / 台历 / 日历 PDF”时使用。
---

# 可打印日历

1. `cal_open(inputs, settings?, project?)`:读取事件表(可选)并预览全年。inputs 是工作区相对路径。
- 结果里有汇总、问题列表(错误 / 提醒)和前几行数据,每行有编号 `#n`。
- 可以不选文件:`inputs: []`。settings: {year, startMonth: 1, months: 12, weekStart: "mon", page: "A4", orientation: "auto", lang: "both", title, weekNumbers, holidays};holidays 写“2027-01-01 元旦, 2027-02-06..2027-02-12 春节”。
2. 向用户简要说明结果,先说错误和需要确认的地方,不要逐行念。
3. 用户要改时调用 `cal_edit(project, settings?, set?: [{row, values}], add?, remove?)`。
- 每行是一个日期事项:`set: [{row, values: {include, date, endDate, title, kind: "活动"|"假期"|"补班", color}}]`。
4. `cal_export(project, formats?)`:导出 calendar-<年份>-monthly.pdf 和 calendar-<年份>-year.pdf。把文件路径告诉用户。
5. 不要凭记忆填法定节假日;让用户提供或确认官方安排。
51 changes: 51 additions & 0 deletions marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -1673,6 +1673,57 @@
"把上一个 Hi3D 任务生成的模型按角色拆分成部件"
]
}
},
{
"name": "printable-calendar",
"componentTypes": [
"ui"
],
"source": "./external_plugins/printable-calendar",
"displayName": "Printable Calendar",
"displayName_i18n": {
"en": "Printable Calendar",
"zh-CN": "可打印日历"
},
"description": "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.",
"description_i18n": {
"en": "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.",
"zh-CN": "打印一份已经写好节假日和你自己安排的日历。生成每月一页、格子够大可以手写的月历,以及一页看全年的年历。可以选一份日期清单——节假日、调休补班、生日、出差、截止日——也可以直接在设置里输入节假日。年份和月份、每周从周一还是周日开始、A4 或 Letter、中英文、周数和主题色都能选。在本地运行,不用设计服务,无需 API 密钥。"
},
"version": "0.1.0",
"author": {
"name": "Penova",
"url": "https://github.com/ppppp2005-p"
},
"license": "MIT",
"category": "productivity",
"keywords": [
"calendar",
"printable calendar",
"monthly calendar",
"year calendar",
"planner",
"holidays",
"pdf",
"日历",
"月历",
"年历",
"台历",
"可打印",
"节假日"
],
"examplePrompts": [
"Make a 2027 calendar with events.csv titled 青禾 2027",
"Start weeks on Sunday, English labels, Letter paper",
"Add 2027-06-09 Dragon Boat holiday and show week numbers"
],
"examplePrompts_i18n": {
"zh-CN": [
"用 events.csv 做 2027 年日历,标题 青禾 2027",
"每周从周日开始,英文,Letter 纸",
"加上 2027-06-09 端午假期,显示周数"
]
}
}
]
}
Loading