summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2026-06-21 11:36:08 +0300
committerA Farzat <a@farzat.xyz>2026-06-21 11:36:08 +0300
commit1bfa644e012de8c26551d33b7d672f99031f8c41 (patch)
tree51c2d5e03c3809518e00328ecfe59efba6a024fd /src
parentea5c36fff4922c06181e1942d7db36ebb96cfd1b (diff)
downloadrepo2markdown-1bfa644e012de8c26551d33b7d672f99031f8c41.tar.gz
repo2markdown-1bfa644e012de8c26551d33b7d672f99031f8c41.zip
Add module/function docs to run.rs
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,