summivox / thucal2

Tsinghua University curriculum -> iCalendar format (.ics) -> Google Calendar, etc.
http://userscripts.org/scripts/show/159785
22 stars 9 forks source link

单周课程只显示第一周(Mavericks calendar不兼容问题) #18

Open ghost opened 9 years ago

ghost commented 9 years ago

我有一门三学分的电磁场课,周二为全周上课,周四为单周上课。但是在导出的日历中,周二正常,周四的这门课只在第一周时有显示,其他单周并未显示。麻烦各位看一下这种特殊情况~ screen shot 2014-09-22 at 14 46 37 screen shot 2014-09-22 at 14 49 43

summivox commented 9 years ago

可以把你的整体课表html贴一下么? 正常来说只要学校录入信息没出现bug的话我的脚本就不会,虽然之前确实遇到过录入信息有bug的情况。。。

ghost commented 9 years ago

html代码已上传至 http://url.cn/OVhmaJ ,不知道我弄对了没...

summivox commented 9 years ago

看到了,似乎不是分析时出现的问题,有可能是你用的日历软件跟标准iCal的兼容性问题;插件生成的ical文件有吗?

ghost commented 9 years ago

嗯,ical 文件在 http://url.cn/K0Flv6

wuuuuuud commented 9 years ago

google calendar导入没有问题 同学你用的是什么日历服务? @summivox 只要不连续就直接一个一个添加了...单周和双周都有RULE的吧

ghost commented 9 years ago

我用的是Mavericks自带的Calendar,那应该是Calendar的兼容问题。实在是抱歉,用这样一个问题,给各位添麻烦了

ghost commented 9 years ago

我试了一下Google Calendar, 发现星期四的这门课,日历设置是这样的 screen shot 2014-09-23 at 12 03 11 @wuuuuuud 同学说的“只要不连续就直接一个一个添加了”指的就是这个意思吧

能不能如下图所示,导出成ical文件时,对于单周的课程,设置为repeat every two weeks ,after 8 times呢? screen shot 2014-09-23 at 12 09 46 小白用户,不懂脚本,不知道是否容易实现。

chenxiaoqino commented 9 years ago

听说以前这样添加会导致android日历导入出错?

发自我的 iPad

在 2014-9-23,下午12:12,mackondy notifications@github.com 写道:

我试了一下Google Calendar, 发现星期四的这门课,日历设置是这样的 [image: screen shot 2014-09-23 at 12 03 11] https://cloud.githubusercontent.com/assets/5137011/4367425/f6dad284-42d6-11e4-9e51-b7e8536306ea.png @wuuuuuud https://github.com/wuuuuuud 同学说的“只要不连续就直接一个一个添加了”指的就是这个意思吧

能不能如下图所示,导出成ical文件时,对于单周的课程,设置为repeat every two weeks ,after 8 times呢? [image: screen shot 2014-09-23 at 12 09 46] https://cloud.githubusercontent.com/assets/5137011/4367443/a56f414a-42d7-11e4-87cd-e667f61eff5c.png 小白用户,不懂脚本,不知道是否容易实现。

— Reply to this email directly or view it on GitHub https://github.com/summivox/thucal2/issues/18#issuecomment-56474569.

wuuuuuud commented 9 years ago

问@summivox吧,之前的情况我不太了解

发自 Windows 邮件

发件人: chenxiaoqino 发送时间: ‎2014‎年‎9‎月‎23‎日, ‎星期二 ‎13‎:‎05 收件人: summivox/thucal2 抄送: 武韬

听说以前这样添加会导致android日历导入出错?

发自我的 iPad

在 2014-9-23,下午12:12,mackondy notifications@github.com 写道:

我试了一下Google Calendar, 发现星期四的这门课,日历设置是这样的 [image: screen shot 2014-09-23 at 12 03 11] https://cloud.githubusercontent.com/assets/5137011/4367425/f6dad284-42d6-11e4-9e51-b7e8536306ea.png @wuuuuuud https://github.com/wuuuuuud 同学说的“只要不连续就直接一个一个添加了”指的就是这个意思吧

能不能如下图所示,导出成ical文件时,对于单周的课程,设置为repeat every two weeks ,after 8 times呢? [image: screen shot 2014-09-23 at 12 09 46] https://cloud.githubusercontent.com/assets/5137011/4367443/a56f414a-42d7-11e4-87cd-e667f61eff5c.png 小白用户,不懂脚本,不知道是否容易实现。

— Reply to this email directly or view it on GitHub https://github.com/summivox/thucal2/issues/18#issuecomment-56474569.

— Reply to this email directly or view it on GitHub.

summivox commented 9 years ago

首先生成的.ics是正确的。发生不兼容的原因是各日历对ical标准中RRULE, RDATE, EXRULE, EXDATE的实现都很不一致,当然除了每日、每周、每月这些最简单的情况可以用一条RRULE解决以外。

因为1-4周,6周,8-12周这种类型的课必须能够处理(我自己的课表上曾经有过),而这种用RRULE/EXRULE是行不通的,只能用RDATE和EXDATE;而EXDATE在Android上不好使,因此只有用RDATE。

我的意见是wontfix,也许这样改过后在你这里单周能用了,但其他的某个平台就break了;虽然我觉得RRULE:FREQ=WEEKLY;INTERVAL=2;也许也是各平台都支持的……