Add pandoc skeleton code
This commit is contained in:
parent
7d1c36fed0
commit
6ae9459230
4 changed files with 25 additions and 1 deletions
9
src/build/mod.rs
Normal file
9
src/build/mod.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
pub mod pandoc;
|
||||
|
||||
use config::Config;
|
||||
|
||||
|
||||
pub fn build_input(config: &Config, input: String) -> Result<String, String> {
|
||||
pandoc::render(&config, input);
|
||||
return Ok("".into());
|
||||
}
|
11
src/build/pandoc.rs
Normal file
11
src/build/pandoc.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
use config::Config;
|
||||
use pandoc::Pandoc;
|
||||
|
||||
fn build_pandoc(config: &Config) -> Pandoc {
|
||||
return Pandoc::new();
|
||||
}
|
||||
|
||||
|
||||
pub fn render(config: &Config, input: String) {
|
||||
let renderer = build_pandoc(config);
|
||||
}
|
|
@ -4,6 +4,7 @@ extern crate clap;
|
|||
extern crate serde_derive;
|
||||
|
||||
extern crate serde_yaml;
|
||||
extern crate pandoc;
|
||||
|
||||
use std::io::{self, Write};
|
||||
use std::process::exit;
|
||||
|
@ -13,6 +14,7 @@ mod config;
|
|||
mod process;
|
||||
mod input;
|
||||
mod utils;
|
||||
mod build;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
use input::read_input_files;
|
||||
use config::Config;
|
||||
use build::build_input;
|
||||
|
||||
|
||||
pub fn build(config: Config) -> Result<(), String> {
|
||||
let input = try!(read_input_files(config.input));
|
||||
let input = try!(read_input_files(config.input.clone()));
|
||||
println!("{}", input);
|
||||
build_input(&config, input);
|
||||
return Ok(());
|
||||
}
|
||||
|
|
Reference in a new issue