This commit is contained in:
Rakarake 2026-03-24 00:37:16 +01:00
parent 4ae3e75ac3
commit 4b2c64dafd
9 changed files with 225 additions and 26 deletions

View file

@ -1,8 +1,27 @@
use markdown::to_html;
use clap::Parser;
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
/// Name of the person to greet
#[arg(short, long)]
name: String,
/// Number of times to greet
#[arg(short, long, default_value_t = 1)]
count: u8,
}
fn main() {
// arg 1: src, arg 2: dest
let args: Vec<String> = std::env::args().collect();
let input: String = std::fs::read_to_string(&args[1]).unwrap();
print!("{}", to_html(&input));
let args = Args::parse();
// takes directory of markdown files as only argument, outputs
// html output into stdout (TODO make )
if let Some(dir) = std::env::args().skip(1).next() {
// get files in dir
}
//let input: String = std::fs::read_to_string(&args[1]).unwrap();
//print!("{}", to_html(&input));
}