Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal reproducible examples #21

Closed
Robinlovelace opened this issue Oct 10, 2018 · 4 comments
Closed

Minimal reproducible examples #21

Robinlovelace opened this issue Oct 10, 2018 · 4 comments

Comments

@Robinlovelace
Copy link
Member

I just used ical to organise a work event. Thought it would be useful to share the reproducible code:

devtools::install_github("ATFutures/ical")
#> Using GitHub PAT from envvar GITHUB_PAT
#> Skipping install of 'ical' from a github remote, the SHA1 (fe553752) has not changed since last install.
#>   Use `force = TRUE` to force installation
e = ical::ic_event(
  start_time = "2018-10-18 13:30",
  end_time = "2018-10-18 14:30",
  summary = "CDAS supervisory meeting: training"
  )
e
#> # A tibble: 1 x 4
#>   UID              DTSTART             DTEND               SUMMARY        
#>   <chr>            <dttm>              <dttm>              <chr>          
#> 1 ical-8bb3d729-3… 2018-10-18 13:30:00 2018-10-18 14:30:00 CDAS superviso…
ical::ic_write(ic = e, file = "training-event.ics")
readLines("training-event.ics")
#>  [1] "BEGIN:VCALENDAR"                              
#>  [2] "PRODID:-//ATFutures/ical //EN"                
#>  [3] "VERSION:2.0"                                  
#>  [4] "CALSCALE:GREGORIAN"                           
#>  [5] "METHOD:PUBLISH"                               
#>  [6] "BEGIN:VEVENT"                                 
#>  [7] "UID:ical-8bb3d729-304a-4f37-9f63-44a820cc27e3"
#>  [8] "DTSTART:20181018T133000Z"                     
#>  [9] "DTEND:20181018T143000Z"                       
#> [10] "SUMMARY:CDAS supervisory meeting: training"   
#> [11] "END:VEVENT"                                   
#> [12] "END:VCALENDAR"

Created on 2018-10-10 by the reprex package (v0.2.1)

@mpadge
Copy link
Member

mpadge commented Oct 10, 2018

Sweet as bro!

@Robinlovelace
Copy link
Member Author

Yep, the results can be imported into basically any calendar system. It works (but got a comment back after sharing the resulting .ics file - where is it? - suggest we add a location field by default - heads-up @layik ).

@layik
Copy link
Member

layik commented Oct 19, 2018

Yep. Not sure why if I saw this ping?

@layik
Copy link
Member

layik commented Jan 28, 2019

#30

@layik layik closed this as completed Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants