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