raspberry_web/cli.rs
1use clap::{App, Arg, ArgMatches};
2
3/// Parse command line arguments
4pub fn get_cli_args() -> ArgMatches<'static> {
5 let cli_args = App::new("Raspberry Web")
6 .author("Troels Mikkelsen <troelsmikkelsen@gmail.com>")
7 .about("Control GPIO ports on your Raspberry Pi over the network")
8 .arg(
9 Arg::with_name("config-file")
10 .short("c")
11 .long("config-file")
12 .value_name("FILE")
13 .help("Set a custom config file")
14 .takes_value(true)
15 .required(false),
16 )
17 .get_matches();
18
19 cli_args
20}