From 64a81a4b3b14dd4c11405de84c47b5b1369da3d6 Mon Sep 17 00:00:00 2001 From: karuo Date: Tue, 3 Mar 2026 05:02:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20=E5=8D=A1=E8=8B=A5AI=20=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=202026-03-03=2005:02=20|=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=EF=BC=9A=E6=B0=B4=E6=A1=A5=E5=B9=B3=E5=8F=B0=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E3=80=81=E8=BF=90=E8=90=A5=E4=B8=AD=E6=9E=A2=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E5=8F=B0=20|=20=E6=8E=92=E9=99=A4=20>20MB:=2014=20=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../脚本/calendar_remove_dupes_today_and_future.applescript | 48 +++++++++++++++++++ 运营中枢/工作台/gitea_push_log.md | 1 + 运营中枢/工作台/代码管理.md | 1 + 3 files changed, 50 insertions(+) create mode 100644 02_卡人(水)/水桥_平台对接/飞书管理/脚本/calendar_remove_dupes_today_and_future.applescript diff --git a/02_卡人(水)/水桥_平台对接/飞书管理/脚本/calendar_remove_dupes_today_and_future.applescript b/02_卡人(水)/水桥_平台对接/飞书管理/脚本/calendar_remove_dupes_today_and_future.applescript new file mode 100644 index 00000000..4f17653c --- /dev/null +++ b/02_卡人(水)/水桥_平台对接/飞书管理/脚本/calendar_remove_dupes_today_and_future.applescript @@ -0,0 +1,48 @@ +-- 删除「今天 + 未来一段时间」内每天重复的日历项,每天只保留每类第一条 +-- 执行:osascript "本文件路径" +-- 修改 futureDays 可调范围:60=约1分钟,90=默认,365=全年(约3–5分钟) + +set futureDays to 90 + +set baseDay to (current date) +set hours of baseDay to 0 +set minutes of baseDay to 0 +set seconds of baseDay to 0 + +set totalDeleted to 0 + +tell application "Calendar" + set allCals to (every calendar whose writable is true) + if (count of allCals) is 0 then set allCals to calendars + + repeat with dayOffset from 0 to futureDays + set targetDay to baseDay + (dayOffset * 86400) + set dayEnd to targetDay + 86400 + + repeat with cal in allCals + try + set dayEvents to (every event of cal where start date ≥ targetDay and start date < dayEnd) + set seen to {} + set toDelete to {} + repeat with ev in dayEvents + try + set k to (summary of ev) & "|" & ((start date of ev) as text) + if seen contains k then + set end of toDelete to ev + else + set end of seen to k + end if + end try + end repeat + repeat with ev in toDelete + try + delete ev + set totalDeleted to totalDeleted + 1 + end try + end repeat + end try + end repeat + end repeat +end tell + +return "今日及未来" & (futureDays as text) & "天重复项已清理,共删除 " & (totalDeleted as text) & " 条" diff --git a/运营中枢/工作台/gitea_push_log.md b/运营中枢/工作台/gitea_push_log.md index a368adcb..1b268d74 100644 --- a/运营中枢/工作台/gitea_push_log.md +++ b/运营中枢/工作台/gitea_push_log.md @@ -211,3 +211,4 @@ | 2026-03-02 17:10:43 | 🔄 卡若AI 同步 2026-03-02 17:10 | 更新:金仓、运营中枢工作台 | 排除 >20MB: 14 个 | | 2026-03-02 20:52:08 | 🔄 卡若AI 同步 2026-03-02 20:52 | 更新:金盾、卡木、总索引与入口、运营中枢工作台 | 排除 >20MB: 14 个 | | 2026-03-03 04:51:53 | 🔄 卡若AI 同步 2026-03-03 04:51 | 更新:金盾、运营中枢工作台 | 排除 >20MB: 14 个 | +| 2026-03-03 04:58:10 | 🔄 卡若AI 同步 2026-03-03 04:58 | 更新:Cursor规则、总索引与入口、运营中枢工作台 | 排除 >20MB: 14 个 | diff --git a/运营中枢/工作台/代码管理.md b/运营中枢/工作台/代码管理.md index e51b80c7..cc6e6c8f 100644 --- a/运营中枢/工作台/代码管理.md +++ b/运营中枢/工作台/代码管理.md @@ -214,3 +214,4 @@ | 2026-03-02 17:10:43 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-02 17:10 | 更新:金仓、运营中枢工作台 | 排除 >20MB: 14 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) | | 2026-03-02 20:52:08 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-02 20:52 | 更新:金盾、卡木、总索引与入口、运营中枢工作台 | 排除 >20MB: 14 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) | | 2026-03-03 04:51:53 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-03 04:51 | 更新:金盾、运营中枢工作台 | 排除 >20MB: 14 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) | +| 2026-03-03 04:58:10 | 成功 | 成功 | 🔄 卡若AI 同步 2026-03-03 04:58 | 更新:Cursor规则、总索引与入口、运营中枢工作台 | 排除 >20MB: 14 个 | [仓库](http://open.quwanzhi.com:3000/fnvtk/karuo-ai) [百科](http://open.quwanzhi.com:3000/fnvtk/karuo-ai/wiki) |