univert 0.2.0

Universal file converter (library and CLI)
Documentation
1
2
3
4
5
6
7
8
9
10
use std::fs;

use crate::{Job, Result};

pub fn to_md(job: &Job) -> Result<()> {
  let html = fs::read_to_string(job.input)?;
  let md = html2md::parse_html(&html);
  fs::write(job.output, md)?;
  Ok(())
}