text-document-io 1.9.3

Import/export for text-document: plain text, Markdown, HTML, LaTeX, DOCX
Documentation
// Generated by Qleany v1.4.8 from feature_dtos.tera

use common::parser_tools::{
    DjotImportOptions, DocxExportOptions, EpubExportOptions, PdfExportOptions,
};
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ImportPlainTextDto {
    pub plain_text: String,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportPlainTextDto {
    pub plain_text: String,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ImportMarkdownDto {
    pub markdown_text: String,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ImportMarkdownResultDto {
    pub block_count: i64,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportMarkdownDto {
    pub markdown_text: String,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ImportDjotDto {
    pub djot_text: String,
    /// Per-feature selection for the optional block attributes (alignment, line
    /// height, direction, non-breakable lines, background color). Defaults to
    /// all enabled — the fully lossless import.
    pub options: DjotImportOptions,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ImportDjotResultDto {
    pub block_count: i64,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportDjotDto {
    pub djot_text: String,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ImportHtmlDto {
    pub html_text: String,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ImportHtmlResultDto {
    pub block_count: i64,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportHtmlDto {
    pub html_text: String,
}

#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportLatexDto {
    pub document_class: String,
    pub include_preamble: bool,
    /// Drop inline images instead of emitting `\includegraphics`.
    ///
    /// LaTeX resolves a graphic against the filesystem when the document is
    /// compiled, so a caller that will not place the files beside the `.tex` is
    /// choosing between a build error and no image. `#[serde(default)]` so an
    /// older `{ document_class, include_preamble }` payload still loads.
    #[serde(default)]
    pub omit_images: bool,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportLatexResultDto {
    pub latex_text: String,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportDocxDto {
    pub output_path: String,
    // Hand-added (mirrors `ImportDjotDto.options`): page geometry + base typography for a
    // manuscript-style export. `#[serde(default)]` so an older `{ output_path }` payload still
    // loads. If this file is regenerated, re-add this field (or declare it in the manifest).
    #[serde(default)]
    pub options: DocxExportOptions,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportDocxResultDto {
    pub file_path: String,
    pub paragraph_count: i64,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportEpubDto {
    pub output_path: String,
    // Hand-added (mirrors `ExportDocxDto.options`): book-level metadata (title, author,
    // language, reading direction) for the EPUB package. `#[serde(default)]` so an older
    // `{ output_path }` payload still loads. If this file is regenerated, re-add this field (or
    // declare it in the manifest).
    #[serde(default)]
    pub options: EpubExportOptions,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportEpubResultDto {
    pub file_path: String,
    pub chapter_count: i64,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportPdfDto {
    pub output_path: String,
    // Hand-added (mirrors `ExportDocxDto.options`/`ExportEpubDto.options`): page geometry +
    // typography + embedded font bytes for the PDF export. `#[serde(default)]` so an older
    // `{ output_path }` payload still loads. If this file is regenerated, re-add this field (or
    // declare it in the manifest).
    #[serde(default)]
    pub options: PdfExportOptions,
}
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct ExportPdfResultDto {
    pub file_path: String,
    pub page_count: i64,
}