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
60 changes: 60 additions & 0 deletions external_plugins/ics-calendar-builder/.zcode-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "ics-calendar-builder",
"version": "0.1.0",
"description": "Turn an event spreadsheet into a calendar file that Apple Calendar, Google Calendar, Outlook and phones can import. Pick the sheet with titles, dates and times, and get a standard .ics with time zones done properly (daylight saving included), all-day and multi-day events, reminders like 15 minutes or 1 day before, and repeats such as every week, every other week, Mon/Wed/Fri, workdays, monthly or yearly with a count or end date. Also get one .ics per event to send around and a printable schedule. Runs locally; no calendar account or API keys.",
"description_i18n": {
"en": "Turn an event spreadsheet into a calendar file that Apple Calendar, Google Calendar, Outlook and phones can import. Pick the sheet with titles, dates and times, and get a standard .ics with time zones done properly (daylight saving included), all-day and multi-day events, reminders like 15 minutes or 1 day before, and repeats such as every week, every other week, Mon/Wed/Fri, workdays, monthly or yearly with a count or end date. Also get one .ics per event to send around and a printable schedule. Runs locally; no calendar account or API keys.",
"zh-CN": "把活动表格变成 Apple 日历、Google 日历、Outlook 和手机都能导入的日历文件。选上写有标题、日期和时间的表格,就能得到标准的 .ics 文件:时区处理正确(包括夏令时),支持全天和跨多天的活动、提前 15 分钟或 1 天等提醒,以及每周、每两周、每周一三五、工作日、每月、每年等重复规则,可设次数或截止日期。还能给每个活动单独导出 .ics 方便转发,并生成可打印的日程表。在本地运行,不用登录日历账号,无需 API 密钥。"
},
"author": {
"name": "Penova",
"url": "https://github.com/ppppp2005-p"
},
"license": "MIT",
"keywords": [
"ics",
"icalendar",
"calendar",
"schedule",
"event",
"import calendar",
"reminder",
"recurring",
"日历",
"日程",
"ics 文件",
"导入日历",
"提醒",
"活动安排"
],
"skills": "skills",
"mcpServers": {
"ics-calendar-builder": {
"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": "Calendar File Builder"
},
"icon": "calendar",
"server": "ics-calendar-builder",
"resourceUri": "ui://ics-calendar-builder/panel.html",
"availability": "session"
}
]
}
}
21 changes: 21 additions & 0 deletions external_plugins/ics-calendar-builder/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.
52 changes: 52 additions & 0 deletions external_plugins/ics-calendar-builder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Calendar File Builder

Turn an event spreadsheet into a calendar file that Apple Calendar, Google Calendar, Outlook and phones can import. Pick the sheet with titles, dates and times, and get a standard .ics with time zones done properly (daylight saving included), all-day and multi-day events, reminders like 15 minutes or 1 day before, and repeats such as every week, every other week, Mon/Wed/Fri, workdays, monthly or yearly with a count or end date. Also get one .ics per event to send around and a printable schedule. Runs locally; no calendar account or API keys.

## Features

- **From your sheet**: recognises 标题, 日期, 开始, 结束, 结束日期, 全天, 地点, 说明, 重复, 重复截止, 提醒, 分类 and English headers; “14:00-16:00” in one cell works too.
- **Time zones done right**: any IANA zone, with a VTIMEZONE built from real daylight-saving changes.
- **All-day, multi-day and overnight** events.
- **Repeats in plain words**: 每周, 每两周, 每周一三五, 工作日, 每月, 每年, weekly, every 2 weeks… with a count or end date.
- **Reminders**: 15分钟, 1小时, 1天 or several at once; set a default for every event.
- **Outputs**: one calendar file, one .ics per event, and a printable schedule by month.
- **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 `ics-calendar-builder/<project>.project.json` and kept until you re-open the inputs.

## Usage

Ask the agent in ZCode Desktop:

- "Make a calendar file from events.xlsx called 青禾 12 月日程"
- "Add a 10-minute reminder to every event"
- "Export one .ics per event and a printable schedule"

## Tools

| Tool | Purpose |
|---|---|
| `ics_open` | Read the event sheet and check every event. Opens the panel |
| `ics_edit` | Change settings, edit cells by row, add or remove rows |
| `ics_status` | Show the current rows, issues and summary |
| `ics_export` | Write <calendar>.ics, events/*.ics and schedule.html |

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

## Scope (v0.1)

- Creates files to import; it doesn't sync with or write to your online calendar.
- Inviting attendees isn't supported 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 `ics-calendar-builder/` folder in the workspace. No hooks.

## Build and test (developers)

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

## Third-party components and licenses

MIT licensed (author: Penova). Bundled: ExcelJS (MIT), MCP SDK and ext-apps (MIT), zod (MIT); the full list is in `dist/THIRD_PARTY_NOTICES.txt`.
52 changes: 52 additions & 0 deletions external_plugins/ics-calendar-builder/README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 表格转日历

把活动表格变成 Apple 日历、Google 日历、Outlook 和手机都能导入的日历文件。选上写有标题、日期和时间的表格,就能得到标准的 .ics 文件:时区处理正确(包括夏令时),支持全天和跨多天的活动、提前 15 分钟或 1 天等提醒,以及每周、每两周、每周一三五、工作日、每月、每年等重复规则,可设次数或截止日期。还能给每个活动单独导出 .ics 方便转发,并生成可打印的日程表。在本地运行,不用登录日历账号,无需 API 密钥。

## 功能

- **直接用表格**:识别 标题、日期、开始、结束、结束日期、全天、地点、说明、重复、重复截止、提醒、分类 以及英文列名;一个格子里写“14:00-16:00”也可以。
- **时区正确**:任意 IANA 时区,按真实的夏令时切换生成 VTIMEZONE。
- **全天、跨多天、跨零点**的活动都支持。
- **用大白话写重复**:每周、每两周、每周一三五、工作日、每月、每年、weekly、every 2 weeks……可设次数或截止日期。
- **提醒**:15分钟、1小时、1天,或同时设多个;可以给所有活动设默认提醒。
- **输出**:一个日历文件、每个活动一个 .ics,以及按月排列的可打印日程表。
- **面板**:在 ZCode 侧栏里选择输入文件、调整设置、查看问题、直接修改表格里的任意单元格、预览成品并导出。修改保存在 `ics-calendar-builder/<项目>.project.json`,重新打开输入文件前一直保留。

## 使用方法

在 ZCode 桌面端对助手说:

- “用 events.xlsx 做一个日历文件,名字叫 青禾 12 月日程”
- “每个活动都加提前 10 分钟提醒”
- “每个活动单独导出 .ics,再出一份可打印的日程表”

## 工具

| 工具 | 作用 |
|---|---|
| `ics_open` | 读取活动表并检查每个活动,并打开面板 |
| `ics_edit` | 修改设置、按行修改单元格、新增或删除行 |
| `ics_status` | 查看当前数据、问题和汇总 |
| `ics_export` | 导出 <日历名>.ics、events/*.ics 和 schedule.html |

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

## 范围(v0.1)

- 只生成导入用的文件,不会同步或写入你的在线日历。
- v0.1 不支持邀请参会人。

## 隐私、网络与文件

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

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

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

## 第三方组件与许可证

MIT 许可(作者:Penova)。打包的组件:ExcelJS (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: ics-calendar-builder
description: 把活动表格变成 Apple 日历、Google 日历、Outlook 和手机都能导入的日历文件。选上写有标题、日期和时间的表格,就能得到标准的 .ics 文件:时区处理正确(包括夏令时),支持全天和跨多天的活动、提前 15 分钟或 1 天等提醒,以及每周、每两周、每周一三五、工作日、每月、每年等重复规则,可设次数或截止日期。还能给每个活动单独导出 .ics 方便转发,并生成可打印的日程表。在本地运行,不用登录日历账号,无需 API 密钥。 用户提到“生成日历 / ics 文件 / 导入日历 / 表格转日历 / 日程提醒”时使用。
---

# 表格转日历

1. `ics_open(inputs, settings?, project?)`:读取活动表并检查每个活动。inputs 是工作区相对路径。
- 结果里有汇总、问题列表(错误 / 提醒)和前几行数据,每行有编号 `#n`。
- settings: {calName, timezone: "Asia/Shanghai", duration: 60, reminder}。
2. 向用户简要说明结果,先说错误和需要确认的地方,不要逐行念。
3. 用户要改时调用 `ics_edit(project, settings?, set?: [{row, values}], add?, remove?)`。
- 每行是一个活动:`set: [{row, values: {include, title, date, start, end, endDate, allDay, location, repeat, repeatEnd, reminder, category, desc}}]`;repeat 用“每周二”“工作日”这样的写法,repeatEnd 写“10次”或日期。
4. `ics_export(project, formats?)`:导出 <日历名>.ics、events/*.ics 和 schedule.html。把文件路径告诉用户。
5. 不要猜时区;用户没说时用默认值并告诉用户。
52 changes: 52 additions & 0 deletions marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -1673,6 +1673,58 @@
"把上一个 Hi3D 任务生成的模型按角色拆分成部件"
]
}
},
{
"name": "ics-calendar-builder",
"componentTypes": [
"ui"
],
"source": "./external_plugins/ics-calendar-builder",
"displayName": "Calendar File Builder",
"displayName_i18n": {
"en": "Calendar File Builder",
"zh-CN": "表格转日历"
},
"description": "Turn an event spreadsheet into a calendar file that Apple Calendar, Google Calendar, Outlook and phones can import. Pick the sheet with titles, dates and times, and get a standard .ics with time zones done properly (daylight saving included), all-day and multi-day events, reminders like 15 minutes or 1 day before, and repeats such as every week, every other week, Mon/Wed/Fri, workdays, monthly or yearly with a count or end date. Also get one .ics per event to send around and a printable schedule. Runs locally; no calendar account or API keys.",
"description_i18n": {
"en": "Turn an event spreadsheet into a calendar file that Apple Calendar, Google Calendar, Outlook and phones can import. Pick the sheet with titles, dates and times, and get a standard .ics with time zones done properly (daylight saving included), all-day and multi-day events, reminders like 15 minutes or 1 day before, and repeats such as every week, every other week, Mon/Wed/Fri, workdays, monthly or yearly with a count or end date. Also get one .ics per event to send around and a printable schedule. Runs locally; no calendar account or API keys.",
"zh-CN": "把活动表格变成 Apple 日历、Google 日历、Outlook 和手机都能导入的日历文件。选上写有标题、日期和时间的表格,就能得到标准的 .ics 文件:时区处理正确(包括夏令时),支持全天和跨多天的活动、提前 15 分钟或 1 天等提醒,以及每周、每两周、每周一三五、工作日、每月、每年等重复规则,可设次数或截止日期。还能给每个活动单独导出 .ics 方便转发,并生成可打印的日程表。在本地运行,不用登录日历账号,无需 API 密钥。"
},
"version": "0.1.0",
"author": {
"name": "Penova",
"url": "https://github.com/ppppp2005-p"
},
"license": "MIT",
"category": "productivity",
"keywords": [
"ics",
"icalendar",
"calendar",
"schedule",
"event",
"import calendar",
"reminder",
"recurring",
"日历",
"日程",
"ics 文件",
"导入日历",
"提醒",
"活动安排"
],
"examplePrompts": [
"Make a calendar file from events.xlsx called 青禾 12 月日程",
"Add a 10-minute reminder to every event",
"Export one .ics per event and a printable schedule"
],
"examplePrompts_i18n": {
"zh-CN": [
"用 events.xlsx 做一个日历文件,名字叫 青禾 12 月日程",
"每个活动都加提前 10 分钟提醒",
"每个活动单独导出 .ics,再出一份可打印的日程表"
]
}
}
]
}
Loading