mirror of
https://github.com/cyborg42/epub2mdbook.git
synced 2026-02-10 16:24:50 -05:00
init
This commit is contained in:
commit
749af017ca
6 changed files with 1061 additions and 0 deletions
21
src/main.rs
Normal file
21
src/main.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use clap::Parser;
|
||||
use epub2mdbook::convert_epub_to_mdbook;
|
||||
|
||||
#[derive(Parser)]
|
||||
struct Args {
|
||||
/// The path to the input EPUB file
|
||||
#[clap(short, long)]
|
||||
input_epub_path: PathBuf,
|
||||
/// The path to the output directory
|
||||
#[clap(short, long)]
|
||||
output_dir: Option<PathBuf>,
|
||||
}
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
let args = Args::parse();
|
||||
convert_epub_to_mdbook(args.input_epub_path, args.output_dir)?;
|
||||
println!("Conversion completed successfully!");
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue