ATFutures / calendar

R interface to iCal (.ics files)
https://atfutures.github.io/calendar/
Other
41 stars 11 forks source link

Collect a list of example calendars to test on #8

Open Robinlovelace opened 6 years ago

Robinlovelace commented 6 years ago

Eventually these can go into the tests but for now good enough is just to list them.

So far we have:

Any others people find, please add links in comments below.

Robinlovelace commented 6 years ago

OK this should keep us busy for a while and ensure pretty good coverage: https://github.com/mozilla-comm/ical.js/tree/master/samples

Robinlovelace commented 6 years ago

It now reads-in my calendar - some of the fields are not formatted right, but this is major progress: we can read-in calendars from the wild: https://atfutures.github.io/ical/#trying-on-calendars-in-the-wild

@mpadge and @layik can you please try to find calendars that break ic_read()?

Next priority I think is to sort out all the different types of timestamp, the output in the above example is in character format and is a mess! Hence restricting the output to:

c("DESCRIPTION", "SUMMARY", "DTSTART", "DTEND", "STATUS", "SEQUENCE", "LOCATION")
mpadge commented 6 years ago

In case it helps, I've got a standalone C++ lib that coverts almost any arbitrarily messy timestamps to standard format: https://github.com/mpadge/cpp-datetime-convert

Robinlovelace commented 6 years ago

I think so++

Robinlovelace commented 6 years ago

May be overkill though. If you could demo how it would deal with these text strings that would be awesome - it's good it can handle mess as ical timestamps seem messy to me:

ical::ical_example[c(7, 9, 15)]
#> [1] "X-WR-TIMEZONE:Europe/London"    "DTSTART:20180809T160000Z"      
#> [3] "LAST-MODIFIED:20180807T133712Z"
ical::ical_outlook[[2]][c(7, 11)]
#> [1] "DTSTART;TZID=GMT Standard Time:20180515T100000"
#> [2] "DTSTAMP:20180814T134259Z"

Created on 2018-08-14 by the reprex package (v0.2.0).

Robinlovelace commented 6 years ago

Note: slightly less messy text strings can be accessed as follows (note: ic_vector() unhelpfully removes the timezone value - that's a new one for me, hence the X):

ical::ic_vector(ical::ical_example[c(7, 9, 15)])
#>            DTSTART      LAST-MODIFIED 
#> "20180809T160000Z" "20180807T133712Z"
ical::ic_vector(ical::ical_outlook[[2]][c(7, 11)])
#> DTSTART;TZID=GMT Standard Time                        DTSTAMP 
#>              "20180515T100000"             "20180814T134259Z"

Created on 2018-08-14 by the reprex package (v0.2.0).