summaryrefslogtreecommitdiff
path: root/src/main.rs
blob: 8cbbadb1e390386304d616930307305eafdd7147 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//! Entry point for the main `repo2markdown` binary.
//!
//! This binary parses command-line arguments, connects stdin/stdout, and delegates the actual
//! rendering pipeline to [`run::run`].

mod cli;
mod run;

use std::io;

use clap::Parser;

use crate::{cli::Cli, run::run};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let cli = Cli::parse();

    let stdin = io::stdin();
    let stdout = io::stdout();

    run(&cli, stdin.lock(), stdout.lock())
}