技能标识:calendar-sync
구조화된 문서 데이터에서 날짜 정보(마감일, 일정, 이벤트)를 추출하여 Apple 캘린더에 자동 등록하는 스킬. 문서에서 추출한 일정을 캘린더에 자동 반영한다.
将doc-structurer中结构化文档数据中包含日期信息的项目自动注册到Apple日历中。将截止日期、合同期限、会议日程、活动日期等各种类型的日期转换为适当的日历事件。
根据文档类型和日期性质区分事件:
| 日期字段 | 事件类型 | 通知设置 |
|---|---|---|
| deadline(截止日期) | 全天事件 | 3天前 + 1天前 + 当天上午9点 |
| event_dates(活动) |
| 优先级 | 附加通知 |
|---|---|
| 高 | 增加7天前通知 |
| 中 |
标题:[文档类型] 文档标题
例:[合同] 劳务合同截止
例:[公文] 事业计划书提交期限
位置:(如有地点信息)
备注:
文档类型:合同
发件:OO机构
负责人:洪吉童
摘要:3行摘要内容
金额:50,000,000韩元
日历:文档日程(自动创建)
URL:Notion页面链接(如有)
按文档类型分离日历,或在单一日历内用颜色区分:
| 文档类型 | 颜色 |
|---|---|
| 公文/政府机关 | 红色(紧急/正式) |
| 合同 |
通过Apple Notes MCP或AppleScript直接访问日历:
AppleScript方式:
applescript
tell application Calendar
-- 如果没有文档日程日历则创建
if not (exists calendar 文档日程) then
make new calendar with properties {name:文档日程}
end if
tell calendar 文档日程
make new event with properties {
summary: [合同] 劳务合同截止,
start date: date 2024-04-15 00:00:00,
end date: date 2024-04-15 23:59:59,
allday event: true,
description: 文档类型:合同\n发件:OO机构\n负责人:洪吉童,
url: https://notion.so/...
}
end tell
end tell
添加通知:
applescript
tell application Calendar
tell calendar 文档日程
tell event 事件名
-- 3天前通知(分钟:3 24 60 = 4320)
make new display alarm with properties {trigger interval: -4320}
-- 1天前通知
make new display alarm with properties {trigger interval: -1440}
-- 当天上午9点
make new display alarm with properties {trigger interval: 0}
end tell
end tell
end tell
ChatGPT无法直接访问日历,因此提供以下方式:
方法1:生成ICS文件
生成标准iCalendar(.ics)文件,用户可通过双击添加到日历:
python
from icalendar import Calendar, Event, Alarm
from datetime import datetime, timedelta
def createics(eventsdata):
cal = Calendar()
cal.add(prodid, -//Doc Calendar Sync//KO)
cal.add(version, 2.0)
cal.add(calscale, GREGORIAN)
for item in events_data:
event = Event()
event.add(summary, f[{item[doc_type]}] {item[title]})
event.add(dtstart, item[date])
event.add(description, item[notes])
if item.get(url):
event.add(url, item[url])
# 添加通知
for minutes in item.get(alarms, [-4320, -1440, 0]):
alarm = Alarm()
alarm.add(action, DISPLAY)
alarm.add(trigger, timedelta(minutes=minutes))
alarm.add(description, f[{item[doc_type]}] {item[title]})
event.add_component(alarm)
cal.add_component(event)
return cal.to_ical()
方法2:提供AppleScript代码
生成用户可在macOS终端执行的osascript命令。
方法3:快捷指令(Shortcuts)联动指南
提供利用Apple快捷指令应用设置自动化工作流的指南。
确认同一事件是否已存在于日历中:
当文档中检测到每周、每月、每季度等重复模式时:
| 模式 | 重复规则 |
|---|---|
| 每周 | FREQ=WEEKLY |
| 每月 |
重复结束日期设置为文档的end_date或合同结束日期。
注册完成后报告:
此技能是整个工作流的最后阶段:
doc-parser → doc-structurer → notion-sync → calendar-sync
(读取) (结构化) (DB存储) (日程注册)
按顺序执行4个技能,即可完成读取文件夹内文档→分类/结构化→保存到Notion→将日程注册到日历的完整自动化。
以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:
帮我安装 SkillHub 和 calendar-sync-1776051541 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 calendar-sync-1776051541 技能
skillhub install calendar-sync-1776051541
文件大小: 9.56 KB | 发布时间: 2026-4-14 12:33