summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/run.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/run.rs b/src/run.rs
index 183ce6b..50b076b 100644
--- a/src/run.rs
+++ b/src/run.rs
@@ -1,3 +1,9 @@
+//! Runtime orchestration for the `repo2markdown` binary.
+//!
+//! This module connects parsed CLI options with stdin path-list parsing and Markdown generation.
+//! It reads a NUL-separated list of paths from input, then renders either plain Markdown or a
+//! fenced Markdown document depending on the CLI configuration.
+
use std::io::{Read, Write};
use repo2markdown::{
@@ -7,6 +13,13 @@ use repo2markdown::{
use crate::cli::Cli;
+/// Runs the main `repo2markdown` pipeline.
+///
+/// The input stream is read as a NUL-separated path list. Empty path segments are ignored by the
+/// path-list parser. Paths are resolved and rendered according to `cli` options.
+///
+/// When `cli.fenced` is set, the full generated Markdown document is wrapped in an outer Markdown
+/// fence. Otherwise, plain Markdown is written directly to `output`.
pub fn run<R: Read, W: Write>(
cli: &Cli,
mut input: R,