8 unstable releases (3 breaking)

0.4.0 Jan 4, 2020
0.3.1 Sep 3, 2019
0.3.0 Aug 30, 2019
0.2.1 Jan 11, 2019
0.1.3 Aug 25, 2018

#3 in #answer


Used in 2 crates

MIT license

8KB
159 lines

howto

circleci lib crate.io lib docs.rs bin crate.io License: MIT

Get instant coding answers via the command line. Inspired by gleitz/howdoi

The Library

Usage

let answers = howto(&query).await;
let answer = answers.next().await.unwrap();

println("{}", answer.instruction);

The CLI

Installation

Run with Docker

docker run --rm -it pbzweihander/howto QUERY

Install with Cargo

cargo install howto-cli
howto QUERY

Build yourself

git clone https://github.com/pbzwehiander/howto.git
cd howto/howto-cli
cargo build --release
cargo install --path .
howto QUERY

Usage

howto-cli 0.3.0

USAGE:
    howto-cli [FLAGS] [OPTIONS] [query]...

FLAGS:
    -h, --help       Prints help information
    -f, --full       Whether display the full text of the answer
    -l, --link       Whether display only the answer link
    -V, --version    Prints version information

OPTIONS:
    -n, --num-answers <num-answers>    Number of answers to return [default: 1]
    -p, --position <position>          Select answer in specified position [default: 0]

ARGS:
    <query>...    

lib.rs:

howto

Instant coding answers with Google and StackOverflow. Inspired by gleitz/howdoi.

Usage

let mut answers = howto::howto("file io rust").await;

while let Some(answer) = answers.next().await {
    println!("Answer from {}\n{}", answer.link, answer.instruction);
}

Dependencies

~7–12MB
~227K SLoC