A CLI app that exposes most of the h3o API for scripting.

Related tags

Command-line h3o-cli
Overview

h3o-cli — A CLI app exposing the h3o API for scripting

Crates.io Docs.rs CI Status Coverage License

How to install

Pre-compiled binaries

You can download a pre-compiled executable for Linux, MacOS and Windows operating systems from the release page, then you should copy that executable to a location from your $PATH env.

Build Manually

If you prefer to build h3o-cli manually, or a pre-compiled executable is not provided for your platform, then you can build h3o-cli from the source:

Usage

Each subcommand comes with its own help through -h/--help.

There are two classes of output format for the commands:

  • text format (text and JSON)
  • geo format (KML and GeoJSON)

Most of the commands can either take a single input from the CLI options or a list of input from stdin.

Plain text output can be directly used as input for others, allowing command pipelines.

For geo output:

  • cellToLatLng returns the center (Point) of each index
  • cellToBoundary returns the outline (LineString) of each index
  • cellToPolygon returns the shape (Polygon) of contiguous indexes.

Examples

Prints information (coordinates, area, …) about on given cell:

h3o-cli cellInfo -i 844c001ffffffff

Decodes an index into its components:

h3o-cli indexDecode -i 21b1fb4644920fff --pretty

Creates a GeoJSON file containing the cell center points of all of the resolution 9 hexagons covering Uber HQ and the surrounding region of San Francisco.

h3o-cli cellToChildren --parent 86283082fffffff --resolution 9 \
    | h3o-cli cellToLatLng -f geojson > uber9pts.geojson

Generates the set of indexes that cover Paris at resolution 11 and save the compacted result in cells.txt.

h3o-cli geomToCells -r 11 -f geojson < paris.geojson | h3o-cli compact > cells.txt

Prints the indexes from the 2-ring around 89283082ed7ffff.

h3o-cli gridDisk -o 89283082ed7ffff -r 2

At resolution 7, prints the grid path that goes through a bunch of French cities and return the resulting KML.

h3o-cli latLngToCell -r 7 < cities-center.txt \
    | h3o-cli gridPath \
    | h3o-cli cellToBoundary -f kml

Load the shape of a city, compute the cell coverage at resolution 11 and save the compressed result in city.thc:

h3o-cli geomToCells -r 11 < city.geojson \
    | h3o-cli compact \
    | h3o-cli compress > city.thc

License

BSD 3-Clause

You might also like...
A safe, fast, lightweight embeddable scripting language written in Rust.

Bud (budlang) A safe, fast, lightweight embeddable scripting language written in Rust. WARNING: This crate is not anywhere near being ready to publish

A plugin system for the Rhai embedded scripting language.

Rhai Dylib This crate exposes a simple API to load dylib Rust crates in a Rhai engine using Rhai modules. 🚧 This is a work in progress, the API is su

Simple low-level web server to serve file uploads with some shell scripting-friendly features

http_file_uploader Simple low-level web server to serve file uploads with some shell scripting-friendly features. A bridge between Web's multipart/for

Provides filesystem access for the Rhai scripting language.

About rhai-fs This crate provides filesystem access for the Rhai scripting language. Usage Cargo.toml [dependencies] rhai-fs = "0.1.2" Rhai script //

YAL is Yet Another scripting Language(but worse)

YAL - Yet Another Language YAL is yet another scripting language(but worse). Syntax Basic syntax fun main() { print("Hello, World!"); } Fibonacci

bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language

bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language. Currently, only Rhai is supported, but more languages may be added in the future.

CLI calculator app and library

calc Yet another CLI calculator. Inspired by the excellent https://github.com/alfredxing/calc. Installation With a Rust toolchain in place: cargo inst

CLI app to display list of trending anime, music charts or recommend anime to watch or song to listen to.

Description Anitrendz is a cli app that uses data from the anitiop api to list the top anime and songs or recommend a random anime to watch or song to

Turbine is a toy CLI app for converting Rails schema declarations into equivalent type declarations in other languages.

Turbine Turbine is a toy CLI app for converting Rails schema declarations into equivalent type declarations in other languages. It’s described as a to

Comments
Owner
Hydronium Labs
Hydronium Labs
Most intuitive global cli maker. *(lazy_static + config-rs + clap)

argone Most intuitive global cli maker. *(lazy_static + config-rs + clap) | Examples | Docs | Latest Note | [dependencies] argone = "0.5" Phases Parsi

Doha Lee 6 Dec 9, 2022
A todo list app that indexes your app to find TODO:'s

forgot A todo list app that indexes your app to find TODO:'s Usage to list all your todos forgot list list all your todos ignoring search in ./target,

null 2 Oct 6, 2022
Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.

paleatra v.0.0.1 Command-Line program that takes an image and produces the copy of the image with a thin frame and palette made of the 10 most frequen

Beka Modebadze 24 Dec 29, 2022
A super simple but lightweight logging library that tries to capture the most important (status) information.

Hackerlog A super simple but lightweight logging library that tries to capture the most important (status) information. The following is supported: Lo

434b 3 Aug 22, 2023
The joker_query is a cute query builder, with Joker can implement most complex queries with sugar syntax

joker_query The joker_query is most sugared query builder of Rust, with joker_query can implement most complex queries with sugar syntax Features − (O

DanyalMh 8 Dec 13, 2023
Shell scripting that will knock your socks off

atom Shell scripting that will knock your socks off. NOTE: Click the image above for a video demonstration.

adam mcdaniel 256 Dec 14, 2022
A command line interface meant to bridge the gap between Rust and shell scripting

clawbang A command line interface meant to bridge the gap between Rust and shell scripting. Intended for use with HEREDOCs and shebangs: $ clawbang <<

Chris Dickinson 52 Mar 25, 2022
A simple, human-friendly, embeddable scripting language

Mica Language reference · Rust API A simple, human-friendly scripting language, developed one feature at a time. Human-friendly syntax inspired by Rub

Mica programming language 32 Dec 30, 2022
The GameLisp scripting language

GameLisp GameLisp is a scripting language for Rust game development. To get started, take a look at the homepage. Please note that GameLisp currently

Fleabit 348 Nov 29, 2022
Open-source compiler for the Papyrus scripting language of Bethesda games.

Open Papyrus Compiler This project is still WORK IN PROGRESS. If you have any feature requests, head over to the Issues tab and describe your needs. Y

erri120 22 Dec 5, 2022