Closed anttikon closed 7 years ago
An alternative that comes to mind for getting routes by arrival time:
routahe kamppi punakiventie 12:30
I have thought that it would be pretty user friendly if you could enter arguments in any order:
routahe kamppi 12:30 punakiventie
routahe kamppi punakiventie 12:30
routahe @12:30 punakiventie kamppi
Sure, there's value in free argument order as well. It can get confusing though, for instance, in your last example where the @ sign affects how the other arguments are interpreted.
In the extreme, the arguments would be all named:
routahe --to punakiventie --from kamppi --arrive 12:30
What about some middle of the road: Time is not a separate argument but joined by @
with the respective location. Origin is by default before destination, but can be swapped using --from
or --to
:
routahe 12:30@kamppi punakiventie
routahe kamppi@12:30 punakiventie
routahe kamppi 12:30@punakiventie
routahe kamppi punakiventie@12:30
routahe punakiventie@12:30 --from kamppi
routahe --to punakiventie@12:30 kamppi
Hey I just noticed that I have accidentally posted very confusing example!
I did mean that the time argument could be located anywhere in the statement. In my last example I have swapped origin and destination for some mystical reason. It should have been like this:
routahe @12:30 kamppi punakiventie
Statement structure should absolutely be origin -> destination to avoid some serious confusion. I bet that last example might feel kinda insane. 😁
Implemented this on version 0.2.0 with routahe kamppi pasila @12:30
syntax. Still thinking if this should also work with -a / -d syntax.
It could be something like this to get routes by departure time
routahe 12:30 kamppi punakiventie
and something like this to get routes by arrival time
routahe @12:30 kamppi punakiventie