Giter VIP home page Giter VIP logo

corelocationcli's Introduction

CoreLocationCLI

CoreLocationCLI gets the physical location of your device and prints it to standard output. If you move it can also print your updated location. Kill it with CTRL-C.

Usage

Note for Mac users: make sure Wi-Fi is turned on. Otherwise you will see kCLErrorDomain error 0.

Usage

CoreLocationCLI -h
CoreLocationCLI [-follow] [-verbose] [-format FORMAT]
CoreLocationCLI [-follow] [-verbose] -json
Switch Description
-h Display this help message and exit
-follow Continually print location
-verbose Show debugging output
-format FORMAT Print a formatted string with the following specifiers
-json JSON output mode
Format Description
%latitude Latitude (degrees north; or negative for south)
%longitude Longitude (degrees west; or negative for east)
%altitude Altitude (meters)
%direction Degrees from true north
%speed Meters per second
%h_accuracy Horizontal accuracy (meters)
%v_accuracy Vertical accuracy (meters)
%time Time
%address Reverse geocoded location to an address
%name Reverse geocoded place name
%isoCountryCode Reverse geocoded ISO country code
%country Reverse geocoded country name
%postalCode Reverse geocoded postal code
%administrativeArea Reverse geocoded state or province
%subAdministrativeArea additional administrative area information
%locality Reverse geocoded city name
%subLocality additional city-level information
%thoroughfare Reverse geocoded street address
%subThoroughfare additional street-level information
%region Reverse geocoded geographic region
%timeZone Reverse geocoded time zone

The default format is: %latitude %longitude.

Output examples

./CoreLocationCLI
50.943829 6.941043
./CoreLocationCLI -format "%latitude %longitude\n%address"
50.943829 6.941043
Kaiser-Wilhelm-Ring 21
	Cologne North Rhine-Westphalia 50672
	Germany
./CoreLocationCLI -json
{"address":"407 Keats Rd\nLower Moreland PA 19006\nUnited States","locality":"nLower Moreland","subThoroughfare":"407","time":"2019-10-03 04:10:05 +0000","subLocality":null,"administrativeArea":"PA","country":"United States","thoroughfare":"Keats Rd","region":"<+40.141196,-75.034815> radius 35.91","speed":"-1","latitude":"40.141196","name":"1354 Panther Rd","altitude":"92.00","timeZone":"America\/New_York","isoCountryCode":"US","longitude":"-75.034815","v_accuracy":"65","postalCode":"19006","direction":"-1.0","h_accuracy":"65","subAdministrativeArea":"Montgomery"}

Installation

Install the latest release using Homebrew with:

brew cask install corelocationcli

Or build from the command line using the Xcode compiler:

xcodebuild

Then run your executable from this location:

build/Release/CoreLocationCLI

corelocationcli's People

Contributors

fulldecent avatar kr4dio avatar futuresonus avatar binford2k avatar daij-djan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.