summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cli.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
index b9f30fa..6ef93bb 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -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