From 02c6b50d004d45568854e03f69d556f2b5d6931d Mon Sep 17 00:00:00 2001 From: Guillem Borrell Date: Fri, 20 Jan 2023 10:46:14 +0000 Subject: [PATCH] Added more documentation in the cli --- README.md | 33 ++++++++++++++++++++++++--------- src/main.rs | 10 ++++++++++ 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 04fdcb2..3497b03 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,36 @@ You can install dr the rust way with `cargo install dr` but downloading a binary ``` $ dr --help -Command-line data file processing in Rust +dr is a handy command line tool to handle csv and parquet files. +It is designed to integrate nicely with other command line tools +like cat, sed, awk and database clients cli. You can find more +information an a short tutorial https://git.guillemborrell.es/guillem/dr + Usage: dr [COMMAND] Commands: - csv Read csv, output arrow stream - sql Runs a sql statement on the file - print Pretty prints the table - rpq Read parquet file - wpq Write to a paquet file - help Print this message or the help of the given subcommand(s) + csv + Read csv, output arrow stream + schema + Several table schema related utilities + sql + Runs a sql statement on the file + print + Pretty prints the table + rpq + Read parquet file + wpq + Write to a paquet file + help + Print this message or the help of the given subcommand(s) Options: - -h, --help Print help information - -V, --version Print version information + -h, --help + Print help information (use `-h` for a summary) + + -V, --version + Print version information ``` ## Howto diff --git a/src/main.rs b/src/main.rs index e981dc5..d7b51fc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,6 +8,16 @@ use clap::command; fn main() { // Commands definition let matches = command!() + .author("Guillem Borrell") + .version(env!("CARGO_PKG_VERSION")) + .about("dr is a handy command line tool to handle csv an parquet files") + .long_about( + "dr is a handy command line tool to handle csv and parquet files. +It is designed to integrate nicely with other command line tools +like cat, sed, awk and database clients cli. You can find more +information an a short tutorial https://git.guillemborrell.es/guillem/dr + ", + ) .subcommand(commands::gen_csv_command()) .subcommand(commands::gen_schema_command()) .subcommand(commands::gen_sql_command())