Calendar Generator

👤 zhengqunkoo 📦 v1.0.0 ⭐ 4.2 ⬇️ 525 下载
📄 办公效率 免费

📖 技能介绍


name: ics-generator description: Generates Google Calendar‑compatible .ics files from structured event data.


ics‑generator

When to use

When you need to convert a schedule, study plan, or task list into an iCalendar (.ics) file that can be imported into Google Calendar or any other iCalendar‑compatible client.

Workflow Overview

  1. Collect structured events – each event must contain:    - summary (string)     - description (string, optional)     - start (ISO‑8601 date/time or JS Date)     - end   (ISO‑8601 date/time or JS Date)     - colorId (Google Calendar colour ID, optional) 

  2. Chunking / sequential dates     - First chunk – supply the intended start date (e.g., 2026‑05‑31T09:00:00Z).     - Subsequent chunks – pass the last date of the previous chunk (via the lastDate field). The skill will automatically shift the next chunk’s start date forward by one day, guaranteeing a clean “one‑day‑gap” between chunks.

  3. Run the skill – invoke the run function exported by index.js with the event array and optional lastDate.

Implementation Notes

Feature Details
Google‑Calendar compatibility Automatically injects the required headers:
PRODID:-//Google Inc//Google Calendar 70.6//EN
CALSCALE:GREGORIAN
UTC enforcement All start/end times are normalized to UTC and formatted as YYYYMMDDTHHMMSSZ. Google Calendar accepts this exact format without further conversion.
Unique identifiers Each event receives a UUID‑v4‑derived UID (event-<uuid>) so calendar clients can correctly sync updates.
Color handling If a colorId is supplied, it’s added as X‑GOOGLE‑CALENDAR‑COLOR:<id> inside the VEVENT block.
Output Returns a complete .ics string wrapped in BEGIN:VCALENDAR … END:VCALENDAR. Every VEVENT ends with END:VEVENT and the final block ends with END:VCALENDAR.
Dependencies Node ≥ 20 (for crypto.randomUUID()). No external npm packages—pure JavaScript plus Node’s built‑in crypto module.
License MIT – free to copy, modify, and share.

Why the specific PRODID / CALSCALE?

小葱技能7w4.net持续更新中。

From community feedback, Google Calendar only imported the generated file when those exact values were present. A generic PRODID caused the “Unable to launch event” error; CALSCALE:GREGORIAN tells Google Calendar which calendar system to assume (Gregorian), which is required for proper time‑zone handling.

🤖 AI 评测

这个工具质量不错,能稳定生成日历文件,文档清晰容易上手。无外部依赖的设计让集成更安全可靠,Google Calendar 兼容性也处理得当。不过缺少实际使用示例和测试验证,可能存在隐患,只支持 Node.js 20 以上环境。总体实用性强,但可靠性还需加强。

📊 多维度评分

适应性4.3
规范性3.9
有效性4.6
可靠性3.9
可信度4.3

📁 包含文件 (4 个)

📄 SKILL.md 2.5 KB
📄 _meta.json 132 B
📄 index.js 2.1 KB
📄 package.json 228 B