From 144c333ab60efea6a0e4d9c1805b7398b6b1b4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Berthaud-M=C3=BCller?= Date: Sun, 1 Dec 2019 16:07:08 -0500 Subject: [PATCH] Add more explicit help and readme --- README.md | 20 ++++++++++++++++++++ src/main.rs | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e463c7d --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# Advent of Code 2019 + +> More info : https://adventofcode.com/2019 + +## Usage + +``` +Advent of Code 2019 0.1 + +USAGE: + advent_of_code_2019 --challenge --input + +FLAGS: + -h, --help Prints help information + -V, --version Prints version information + +OPTIONS: + -c, --challenge Challenge id from 1 (1st day, 1st part) to 50 (25th day, 2nd part). + -i, --input Input file, ex `input/day1`. +``` diff --git a/src/main.rs b/src/main.rs index 64a3b61..0a76d88 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,6 +13,7 @@ fn main() { .short("c") .long("challenge") .value_name("CHALLENGE") + .help("Challenge id from 1 (1st day, 1st part) to 50 (25th day, 2nd part).") .required(true) .takes_value(true) .min_values(1) @@ -21,6 +22,7 @@ fn main() { .short("i") .long("input") .value_name("INPUT") + .help("Input file, ex `input/day1`.") .required(true) .takes_value(true)) .get_matches();