docx-rs/docx-core/src/lib.rs

18 lines
374 B
Rust
Raw Normal View History

2019-11-05 08:10:48 +02:00
mod documents;
2019-11-07 09:08:59 +02:00
mod types;
2019-11-05 11:03:23 +02:00
mod xml_builder;
2019-11-07 10:31:04 +02:00
mod zipper;
2019-11-05 08:10:48 +02:00
2019-11-07 10:31:04 +02:00
pub use documents::*;
2019-11-07 11:45:03 +02:00
pub use types::*;
pub use zipper::*;
2019-09-13 13:41:05 +03:00
pub fn simple() {
2019-11-07 10:31:04 +02:00
let xml = Docx::new()
.add_paragraph(Paragraph::new().add_run(Run::new("Hello")))
.build();
2019-11-07 11:45:03 +02:00
let path = std::path::Path::new("./test.docx");
let file = std::fs::File::create(&path).unwrap();
zip(file, xml);
2019-09-11 21:28:14 +03:00
}