Crates.io | w3w-api |
lib.rs | w3w-api |
version | 0.1.1 |
source | src |
created_at | 2021-03-29 15:35:07.567591 |
updated_at | 2021-03-29 15:38:03.21264 |
description | Rust library for what3words public API |
homepage | |
repository | https://github.com/Br1ght0ne/w3w-rs/ |
max_upload_size | |
id | 375242 |
size | 7,527 |
Rust crates for accessing what3words public API
w3w-cli
CLI that provided access to what3words public API in batch mode.
Binary releases are not provided yet.
If you have a recent installation of Rust, you can use cargo install
:
cargo install w3w-cli
The binary name is w3w
for brevity.
You need to have a what3words API key.
You can provide it via -k|--key
flag or via W3W_API_KEY
env variable.
w3w
uses the same strategy as cat(1)
for handling files and standard input.
(WIP: w3w
doesn't currently support multiple files, you can use cat(1)
beforehand :smile:)
If no [file]
is provided, input is read from stdout.
USAGE:
w3w [OPTIONS] --api-key <api-key> <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-k, --api-key <api-key> Your what3words API key [env: W3W_API_KEY]
--log-format <format> Log format to be used by tracing-subscriber [env: W3W_LOG_FORMAT=] [default: full]
[possible values: compact, full, json, pretty]
-o, --output-format <format> Output format to write to stdout [env: W3W_OUTPUT_FORMAT=] [default: plain]
[possible values: plain, json]
SUBCOMMANDS:
available-languages List all available language for three-word-addresses
help Prints this message or the help of the given subcommand(s)
to-3wa Convert geographic coordinates to three-word-addresses
to-coords Convert three-word-addresses to geographic coordinates
$ w3w to-coords <(echo "filled.count.soap")
51.520847,-0.195521
$ w3w -o json to-coords <(echo "filled.count.soap") | jq .coordinates
{ "lat": 51.520847, "lng": -0.195521 }
$ w3w to-3wa <(echo "51.520847,-0.195521")
filled.count.soap
$ w3w available-languages
English (en), German (de), ...
w3w-api
Rust library for what3words public API.
All kinds of contributions are welcome, especially about increasing the coverage of upstream API.
This project is licensed under MIT license.