hyperRail icon indicating copy to clipboard operation
hyperRail copied to clipboard

Export as ics file

Open mielvds opened this issue 8 years ago • 4 comments

Nice to have: an export to calendar for every route. Maybe with this script: https://gist.github.com/jakebellacera/635416

mielvds avatar May 15 '17 14:05 mielvds

What about a composer package to solve the problem? I saw something like https://packagist.org/packages/eluceo/ical

avdg avatar May 15 '17 15:05 avdg

I want to take some time implementing this, but I could use some feedback. As far as I can see we have two options:

  • Adding the composer package mentioned above and generating the ICS file in PHP. This would mean sending all the data through a GET/POST request.
  • Adding a Javascript dependency ( https://github.com/nwcell/ics.js ) to generate the file in the browser. This looks promising, but activity on the project is low.

My feeling is that the GET/POST approach would work best, where I send the information from /route/ call back to the back-end to generate the ICS file.

kidk avatar Jul 13 '17 14:07 kidk

I agree, that will also allow you to archive and cache the ics files if desired.

mielvds avatar Jul 13 '17 14:07 mielvds

Pull request is live, still a bit WIP, but comments welcome. https://github.com/iRail/hyperRail/pull/260

kidk avatar Jul 17 '17 09:07 kidk