|
|
@ -1,9 +1,9 @@
|
|
|
|
pub mod svg;
|
|
|
|
pub mod svg;
|
|
|
|
use svg::*;
|
|
|
|
use svg::*;
|
|
|
|
|
|
|
|
|
|
|
|
use std::{fs::OpenOptions, io::Write};
|
|
|
|
|
|
|
|
use askama::Template;
|
|
|
|
use askama::Template;
|
|
|
|
use derive_more::From;
|
|
|
|
use derive_more::From;
|
|
|
|
|
|
|
|
use std::{fs::OpenOptions, io::Write};
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Template)]
|
|
|
|
#[derive(Template)]
|
|
|
|
#[template(path = "document.xml")]
|
|
|
|
#[template(path = "document.xml")]
|
|
|
@ -26,7 +26,7 @@ fn main() -> Result<(), Error> {
|
|
|
|
.open("output.svg")?;
|
|
|
|
.open("output.svg")?;
|
|
|
|
let document = DocumentTemplate {
|
|
|
|
let document = DocumentTemplate {
|
|
|
|
width: SVGMeasure::new(8.5, SVGUnit::Inch),
|
|
|
|
width: SVGMeasure::new(8.5, SVGUnit::Inch),
|
|
|
|
height: SVGMeasure::new(11.0,SVGUnit::Inch),
|
|
|
|
height: SVGMeasure::new(11.0, SVGUnit::Inch),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
write!(file, "{}", document.render()?)?;
|
|
|
|
write!(file, "{}", document.render()?)?;
|
|
|
|
Ok(())
|
|
|
|
Ok(())
|
|
|
|