8 个不稳定版本 (3 个破坏性更新)
| 0.4.0 | 2020年1月4日 | 
|---|---|
| 0.3.1 | 2019年9月3日 | 
| 0.3.0 | 2019年8月30日 | 
| 0.2.1 | 2019年1月11日 | 
| 0.1.3 | 2018年8月25日 | 
#15 in #stack-overflow
每月下载 65 次
用于  2 crates
8KB
159 行代码(不包括注释)
howto
通过命令行获得即时编码答案。受 gleitz/howdoi 启发。
库
用法
let answers = howto(&query).await;
let answer = answers.next().await.unwrap();
println("{}", answer.instruction);
命令行界面
安装
使用 Docker 运行
docker run --rm -it pbzweihander/howto QUERY
使用 Cargo 安装
cargo install howto-cli
howto QUERY
自行构建
git clone https://github.com/pbzwehiander/howto.git
cd howto/howto-cli
cargo build --release
cargo install --path .
howto QUERY
用法
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
通过 Google 和 StackOverflow 获得即时编码答案。受 gleitz/howdoi 启发。
用法
let mut answers = howto::howto("file io rust").await;
while let Some(answer) = answers.next().await {
    println!("Answer from {}\n{}", answer.link, answer.instruction);
}
依赖项
~6–11MB
~238K SLoC