以编程方式将 ICS 文件导入 iCalendar

发布于 2024-12-20 23:10:38 字数 196 浏览 1 评论 0原文

我使用 iCalendar 模块和 python 编写了一个 ICS 文件。

我的问题是,如何告诉 iCalendar 读取 ICS 文件?我想我可以把它放在 ~/Library/iCalendar/<--->/Events 中,但似乎只是在导入 ICS 文件后才存储它们。

有谁知道我可以做到这一点的方法吗?

谢谢,

I've written an ICS file using the iCalendar module and python.

My trouble is, how can I tell iCalendar to read the ICS file? I thought I could put it in ~/Library/iCalendar/<--->/Events but it seems that just stores the ICS files once they've been imported.

Does anyone know a way I could do this?

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

感性不性感 2024-12-27 23:10:38

您可以使用 Applescript 或 Python 脚本桥框架。无论哪种情况,请告诉 iCal 添加事件。

示例(Applescript 中):

tell application "iCal"
   tell calendar "Work"
      set theDate to current date
      make new event at end with properties {description:"The Event Description", 
         summary:"Event Name", location:"Main Street", start date:theDate, 
         allday event:true}
   end tell
end tell

或者使用相同的方法告诉 iCal 打开并导入该文件。

You would use Applescript or Python scripting bridge framework. In either case, tell iCal to add the events.

An example (in Applescript):

tell application "iCal"
   tell calendar "Work"
      set theDate to current date
      make new event at end with properties {description:"The Event Description", 
         summary:"Event Name", location:"Main Street", start date:theDate, 
         allday event:true}
   end tell
end tell

Or use the same method to just tell iCal to open and import that file.

丿*梦醉红颜 2024-12-27 23:10:38

您可以告诉 iCal 打开 ics 文件。

You could tell iCal to open the ics file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文