是否有现有的库或脚本集可以用 Python 为 Google Calendar API 编写重复事件字符串?

发布于 2024-10-25 07:22:21 字数 595 浏览 10 评论 0原文

我有一个基于 Python 的程序,可以将事件添加到 Google 日历。要添加重复的事件,我需要指定符合 RFC 2445 标准的 recurrent_data 字符串。下面是一个示例,来自 http://code.google.com /apis/calendar/data/1.0/developers_guide_python.html#CreatingRecurring

'DTSTART;VALUE=DATE:20070501\r\n'
        + 'DTEND;VALUE=DATE:20070502\r\n'
        + 'RRULE:FREQ=WEEKLY;BYDAY=Tu;UNTIL=20070904\r\n'

是否有人编写了一组可自动生成这些字符串和/或以其他方式将重复事件写入 Google 日历的函数?自己编写一些函数似乎并不太困难,但我想检查一下我是否会重复 ical 或 GData API 社区中的任何长期工作。

I have a Python-based program that adds events to a Google Calendar. To add events that repeat, I need to specify a recurrent_data string that conforms to the RFC 2445 standard. An example is below, from http://code.google.com/apis/calendar/data/1.0/developers_guide_python.html#CreatingRecurring:

'DTSTART;VALUE=DATE:20070501\r\n'
        + 'DTEND;VALUE=DATE:20070502\r\n'
        + 'RRULE:FREQ=WEEKLY;BYDAY=Tu;UNTIL=20070904\r\n'

Has anyone written a set of functions that will automatically generate these strings, and/or otherwise write recurring events to Google Calendar? It doesn't seem too difficult to write some functions myself, but I wanted to check whether I'd be duplicating any long-standing efforts in the ical or GData API communities.

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

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

发布评论

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

评论(2

つ低調成傷 2024-11-01 07:22:21

我发现的只是 iCalendar 模块,它可以创建符合 RFC 2445 的数据。您现在最好的选择可能是基于示例< /a> 部分由 Google 提供。

All I found was the iCalendar module which can create RFC 2445-compliant data. Your best bet right now might be creating a template based on the Example section here provided by Google.

怪异←思 2024-11-01 07:22:21

还有另一个名为 icalendar 的库,它可以作为名为 icalendar

There is another library called icalendar which is available as node.js npm module called icalendar.

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