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

Automatic update of destination #22

Open
GHLasse opened this issue Oct 21, 2017 · 1 comment
Open

Automatic update of destination #22

GHLasse opened this issue Oct 21, 2017 · 1 comment

Comments

@GHLasse
Copy link
Contributor

GHLasse commented Oct 21, 2017

Just an idea for an enhancement which I happen to work on:
Wouldn't it be neat if the module would show you how to get to your next appointment?

This is what I did so far:

  • The default calendar module broadcasts the events
  • I added my Google calendar to the calendar module and added some test events to it.
  • I added a notificationreceiver to the local-transport module which detects the calendar module broadcast.
  • I made it filter out the first event which hasn't started yet and has a location defined.
  • If this event is less than one day from now, I replace the destination with the location of the event.
  • If there is no valid event within one day, the default destination is chosen instead.
  • I also added a key %{dest} which can be placed into the header and is replaced by the destination address returned by the google query.

This all works and I am happy to push it soon after some tidying up of the code, but if people have more ideas on what this enhancement should be able to do, then let me know :-)

@GHLasse
Copy link
Contributor Author

GHLasse commented Nov 8, 2017

I would be greatful if anyone can test it and create a preview for it (would be best as a gif where the change in destination can be seen)

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

1 participant