101
Find And Run Robot / Re: Openstreetmap alias(es)?
« on: October 11, 2020, 03:32 AM »
Try this
Alias name: OpenStreetMap direction
Alias regex: ^dir (.*) (.*)$
Alias result:
Things missing: A way to default the from location to ones current location. Selecting mode of transport (default is car). Such details should be findable on their wiki or help pages
https://help.openstr...-a-parameter-via-url
edit: sorry that gives an error, need to encode the & character. Will update later when more time. My mistake, it does work.
In general if you want to make or tweak these kind of website URL search aliases the keywords to google for is <site name> and URL query or URL search syntax or similar terms. The other thing to try is to type in a search on the website and see if the browser URL changes. Often the pattern to use is visible then. For example if we go to https://www.wikipedia.org/ and search for "ball" the URL changes to https://en.wikipedia.org/wiki/Ball , which means the FARR alias would be something like
alias name: wikipedia
alias regex: ^wiki (.*)$
alias result:
Alias name: OpenStreetMap direction
Alias regex: ^dir (.*) (.*)$
Alias result:
To: $$1 From: $$2 | https://www.openstreetmap.org/directions?to=$$1&from=$$2
Things missing: A way to default the from location to ones current location. Selecting mode of transport (default is car). Such details should be findable on their wiki or help pages
https://help.openstr...-a-parameter-via-url
In general if you want to make or tweak these kind of website URL search aliases the keywords to google for is <site name> and URL query or URL search syntax or similar terms. The other thing to try is to type in a search on the website and see if the browser URL changes. Often the pattern to use is visible then. For example if we go to https://www.wikipedia.org/ and search for "ball" the URL changes to https://en.wikipedia.org/wiki/Ball , which means the FARR alias would be something like
alias name: wikipedia
alias regex: ^wiki (.*)$
alias result:
Wiki $$1 | https://en.wikipedia.org/wiki/$$1