macos - 使用 Applescript 或 Automator 编辑日历以将所有事件“向前移动”一天
问题描述
我希望能够将我的 mac 日历中的所有事件向上移动一天,最好能够排除周末。
用例:一个培训计划有 10 周的每日课程。日历是通过 csv 上传的,针对开始日期和跳过的日期进行了编辑。如果一个人错过了一天,他们可以简单地将所有事件推进一天。
我看过 Automator,似乎没有一种简单的方法来设置它,除了可能的文件夹操作选项。
有人做过这样的事情吗?
解决方案
从 Catalina 开始,我会小心 AppleScripting Calendar.app,因为它现在非常有问题,并且在出现问题时很容易导致数据丢失。
但是,非脚本解决方案是在月视图中查看事件时剪切和粘贴事件:
选择您希望提出的所有事件,最好从最后一个开始,这样您就可以在第一个结束;
如果您取消选择所有其他日历,以便唯一可见的事件是您的培训计划中的事件(我认为这些事件存储在他们自己的日历中,对吧...?!),那么您可以⌘</kbd>A to Select All, being careful to deselect the ones that overlap from the previous month or into the next month. Individual events are selected/deselected by holding down ⌘</kbd> and clicking the event.
打⌘</kbd>X to Cut them to the clipboard;
使用鼠标单击包含第一个事件的前一天;
打⌘</kbd>V to Paste the events, the first of which will be pasted into the day that you clicked in step ⓷, with the remaining events repositioned by the same relative amount as was the first.
推荐阅读
- python - 如何从抓取的网址中抓取元素?刮擦
- spring-boot - 有没有办法弃用移动到另一个前缀的属性?
- php - 在 mysql 中求和 2 个值以制作排行榜
- sequelize.js - 在sequelize中,如何使用findAndCountAll获取联结表行数?
- python - 无法将函数并行映射到 tarfile 成员
- cucumber - 通过 Cucumber 场景控制两个 chrome 实例,由 Watir Webdriver 驱动
- node.js - 无法读取未定义 Discord.js 的“执行”
- asp.net-mvc - 如何在一个表单中处理多个文件而不知道它们的数量?
- google-cloud-platform - Google Speech API - POST URL 中的“位置”是什么?
- ocr - 为什么 tesseract 忽略图像的右侧部分?