kiliankoe / alfred_dvb

🚍 Find public transport departures in the VVO/DVB network from Alfred
MIT License
14 stars 1 forks source link

Go rewrite #15

Closed kiliankoe closed 8 years ago

kiliankoe commented 8 years ago

Kicked out all code of the previous implementation, including the Cocoa app for scheduling notifications.

The go version depends on dvbgo and interestingly enough actually feels quite a bit faster. Might just be a coincidence though, as the slowness of the previous implementation should be due the VVO API and not the implementation. At least I believe that to be the case πŸ˜„

I haven't found a solution yet for scheduling the notifications, as #14 somehow needs {query} to dynamically set the delay and then also post a custom notification depending on {query} as well. Not sure how that would be possible.

The rest works nicely though and is a straight clone of the current version 😊 Just that it no longer depends on node and can be bundled as a binary inside the workflow, which is nice.

In case anybody wants to try this out, be sure to run $ go build alfred_dvb.go first. Committing the binary was a stupid decision and I kicked it out again. It should be bundled with the workflow however.

Regarding that last point. It might be overkill for this workflow, but it'd be extremely awesome to have some kind of tooling that compiles and bundles the workflow with a new version automatically. If said tool is also able to change the workflow to switch between an exec of go run alfred_dvb.go and alfred_dvb on the compiled version and the dev version, that would be so awesome 😍

kiliankoe commented 8 years ago

The rest works nicely though and is a straight clone of the current version

Besides also being prone to #13 πŸ™„

kiliankoe commented 8 years ago

I believe the previously mentioned issue should be fixed with https://github.com/kiliankoe/dvbgo/commit/40efe10c40eac1c1ec87d3def5af93c5ae3b1fe1. Generally a dirty issue though...

kiliankoe commented 8 years ago

Delayed notifications work, although they're worded a bit more generic to work with any departure. Alfred prevents a user scheduling a notification for a departure sooner than 10 minutes in the future, which is pretty nifty. Only downside there is a missing explanation as to why nothing's happening.

Now I'm going to have to find someone to try this out and see if it's "ok" before merging and overwriting the old implementation πŸ˜„

kiliankoe commented 8 years ago

And now the rewrite actually does more than the previous version \o/ πŸŽ‰