mod docx;
mod utils;
pub use docx::*;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_1() {
let mut docx = DOCX::new("example/test.docx".to_string());
docx.read();
docx.add_placeholders_from_json(r#"{
"exam": {
"level": "form 2-A",
"variant": "1 variant",
"title": "Math exam",
"subject": "math"
}
}"#);
docx.add_image_placeholder("image1.jpeg", "example/replace_image1.png");
docx.init_placeholders();
docx.save("output.docx");
println!("✅ File saved: output.docx")
}
}