geolocate

Crates.iogeolocate
lib.rsgeolocate
version5.3.2
sourcesrc
created_at2022-09-03 16:29:45.237594
updated_at2023-05-13 11:18:36.755484
descriptionA CLI for geolocation data providers
homepage
repositoryhttps://github.com/westernwontons/geolocate
max_upload_size
id657957
size57,504
Nagy Botond (westernwontons)

documentation

README

Geolocate

Geolocate is a CLI app to fetch geolocation data from various providers. Currently, we support ip2location and ipgeolocation. If you'd like others to be supported, you're welcome to create a feature request.

Installation

Geolocate compiles on stable. There are multiple ways to install it:

Usage

You should start with getting some API tokens for at least one of the supported providers. Both ip2location and ipgeolocation have a free tier. You can save them with geolocate config --edit. This command will open the configuration file with you favourite editor where you will have to add the tokens. IMPORTANT: The key of the token has to be name of the provider. For example:

ip2location = "yourtokengoeshere"
ipgeolocation = "yourothertokengoeshere"

If you don't do this, geolocate will not recognise them and won't be very useful. Be sure you write correct toml data, but

A subcommand exists for each provider. For example, to fetch geo data for an IP address of 1.2.3.4 from the ipgeolocation provider, you would run the following:

geolocate ipgeolocation 1.2.3.4

The IP addresses may be IPv4 or IPv6. Geolocate will accept either so long they're correct, but makes no guarantees that the provider accepts them.

Commit count: 60

cargo fmt