Crates.io | help_crafter |
lib.rs | help_crafter |
version | 0.3.1 |
source | src |
created_at | 2023-05-31 09:25:49.244195 |
updated_at | 2023-06-03 05:51:52.135593 |
description | Simple help message generator without hussle |
homepage | https://github.com/drp4rad0x/help_crafter |
repository | https://github.com/drp4rad0x/help_crafter |
max_upload_size | |
id | 878637 |
size | 14,725 |
This crate provides simple method for generating help messages for your CLI application.
use help_crafter::enums::{DASHED, Parameter};
use help_crafter::HelpMessageBuilder;
let help = HelpMessageBuilder::default()
.command("i", "index", Parameter::NO, "index", DASHED::YES)
.command(
"k",
"kill",
Parameter::REQUIRED("sessions_id"),
"the big brown fox jumps over the lazy dog the big brown fox",
DASHED::YES,
)
.command(
"",
"rub",
Parameter::OPTIONAL("something"),
"rub something",
DASHED::NO,
)
.command(
"t",
"",
Parameter::REQUIRED("something"),
"t something",
DASHED::YES,
)
.command(
"o",
"",
Parameter::OPTIONAL("something"),
"o something",
DASHED::NO,
)
.build();