diff options
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,8 @@ +//! Command-line argument parsing for the main `repo2markdown` binary. +//! +//! This module defines the CLI shape and translates parsed arguments into internal rendering and +//! logging configuration. + use std::path::PathBuf; use clap::Parser; @@ -47,6 +52,10 @@ pub struct Cli { } impl Cli { + /// Converts CLI rendering flags into renderer options. + /// + /// These options control file-size limits and whether skipped files are represented by + /// placeholder entries in the generated Markdown. pub fn render_options(&self) -> RenderOptions { RenderOptions { max_file_size: self.max_file_size, @@ -55,6 +64,10 @@ impl Cli { } } + /// Returns the logging verbosity requested by the user. + /// + /// `--quiet` suppresses warnings and info messages, `--verbose` enables both warnings and info + /// messages, and the default mode emits warnings only. pub fn verbosity(&self) -> Verbosity { if self.quiet { Verbosity::Quiet |
