Comments (2)
Also I've made a small script:
#!/usr/bin/env bash
set -e
main() {
output=''
while ! does-include "$output" 'Latitude' ; do
output=$(whereami)
done
echo $(fetch "$output" 'Latitude') $(fetch "$output" 'Longitude')
}
fetch() {
echo "$1" | grep "$2" | head -n 1 | cut -d' ' -f2
}
does-include() {
echo "$1" | grep "$2" > /dev/null
}
main "$@"
It makes output more consistent - remove duplicates, keeps retrying till return results, and returns just latitude and longitude, i.e.:
$ w97-whereami
56.320956 44.027472
from whereami.
$ brew cask install whereami ==> Downloading https://github.com/robmathers/WhereAmI/releases/download/v1.02/whereami-1.02.zip ######################################################################## 100.0% ==> Verifying checksum for Cask whereami ==> Symlinking Binary 'whereami' to '/usr/local/bin/whereami' 🍺 whereami staged at '/opt/homebrew-cask/Caskroom/whereami/latest' (36K)
Now brew cask install
is deprecated; just use brew install
is okay. And tested on Apple Silicon with macOS 11.3, it works fine.
BTW, @welldan97 it warns me Warning: Unexpected method 'license' called on Cask whereami.
when I tapped your formula; probably you can fix that.
from whereami.
Related Issues (10)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whereami.