Export as ics file
Nice to have: an export to calendar for every route. Maybe with this script: https://gist.github.com/jakebellacera/635416
What about a composer package to solve the problem? I saw something like https://packagist.org/packages/eluceo/ical
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.
I agree, that will also allow you to archive and cache the ics files if desired.
Pull request is live, still a bit WIP, but comments welcome. https://github.com/iRail/hyperRail/pull/260