Skip to content

Commit

Permalink
save progress
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Dec 1, 2024
1 parent 3d9e660 commit b0cfa9d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cli/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ pub mod resource {
<Self as Resource>::Value: Sized,
Self: Sized;

/* fn print_help(&self) -> String; */

#[cfg(test)]
fn parse_argv_from(
&self,
Expand Down
27 changes: 27 additions & 0 deletions cli/src/args/compress/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,33 @@ pub mod argv {
impl error::Error for OutputTypeError {}

impl ArgvResource for OutputFlagsResource {
/* fn print_help(&self) -> String { */
/* r#" */
/* Output flags (OUTPUT-FLAGS): Where and how to write the generated zip archive. */

/* If not specified, output is written to stdout. */

/* OUTPUT-FLAGS = [--append] --output-file <file> */
/* = --stdout */

/* -o, --output-file <file> */
/* Output zip file path to write. */

/* The output file is truncated if it already exists, unless --append is */
/* provided. */

/* --append */
/* If an output path is provided with -o, open it as an existing zip */
/* archive and append to it. */

/* If the output path does not already exist, no error is produced, and */
/* a new zip file is created at the given path. */

/* --stdout */
/* Allow writing output to stdout even if stdout is a tty. */
/* "# */
/* } */

type ArgvParseError = OutputTypeError;
fn parse_argv(
&self,
Expand Down
19 changes: 18 additions & 1 deletion cli/src/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,24 @@ pub mod printer {
}
}

pub trait HelpSection {}
pub trait HelpCase {
fn value(&self) -> &str;
fn description(&self) -> String;
fn extended_description_with_caveats_and_defaults(&self) -> Option<String>;
}

pub trait HelpSection {
fn name(&self) -> &str;
fn id(&self) -> &str;
fn description(&self) -> Option<String>;
fn extended_description_with_caveats_and_defaults(&self) -> Option<String>;
fn cases(&self) -> Vec<Box<dyn HelpCase>>;
fn post(&self) -> Option<String>;
}

pub struct FlagsSection {}

pub struct StringPattern {}

pub enum HelpVerbosity {
NameOnly,
Expand Down

0 comments on commit b0cfa9d

Please sign in to comment.