all2md.options.odp
Configuration options for ODP (OpenDocument Presentation) parsing and rendering.
This module defines options for parsing and rendering ODP presentation files.
- class all2md.options.odp.OdpOptions
Bases:
PaginatedParserOptionsConfiguration options for ODP-to-Markdown conversion.
This dataclass contains settings specific to OpenDocument Presentation (ODP) processing, including slide selection, numbering, and notes.
- Parameters:
preserve_tables (bool, default True) – Whether to preserve table formatting in Markdown.
include_slide_numbers (bool, default False) – Whether to include slide numbers in the output.
include_notes (bool, default True) – Whether to include speaker notes in the conversion.
page_separator_template (str, default "---") – Template for slide separators. Supports placeholders: {page_num}, {total_pages}.
slides (str or None, default None) – Slide selection (e.g., “1,3-5,8” for slides 1, 3-5, and 8).
- preserve_tables: bool = True
- include_slide_numbers: bool = False
- include_notes: bool = True
- slides: str | None = None
- __init__(attachment_mode: AttachmentMode = 'alt_text', alt_text_mode: AltTextMode = 'default', attachment_output_dir: str | None = None, attachment_base_url: str | None = None, max_asset_size_bytes: int = 52428800, attachment_filename_template: str = '{stem}_{type}{seq}.{ext}', attachment_overwrite: AttachmentOverwriteMode = 'unique', attachment_deduplicate_by_hash: bool = False, attachments_footnotes_section: str | None = 'Attachments', extract_metadata: bool = False, page_separator_template: str = '-----', preserve_tables: bool = True, include_slide_numbers: bool = False, include_notes: bool = True, slides: str | None = None) None
- class all2md.options.odp.OdpRendererOptions
Bases:
BaseRendererOptionsConfiguration options for rendering AST to ODP format.
This dataclass contains settings specific to OpenDocument Presentation generation from AST, including slide splitting strategies and layout.
- Parameters:
slide_split_mode ({"separator", "heading", "auto"}, default "auto") – How to split the AST into slides: - “separator”: Split on ThematicBreak nodes - “heading”: Split on specific heading level - “auto”: Try separator first, fallback to heading-based splitting
slide_split_heading_level (int, default 2) – Heading level to use for slide splits when using heading mode.
default_layout (str, default "Default") – Default slide layout name.
title_slide_layout (str, default "Title") – Layout name for the first slide.
use_heading_as_slide_title (bool, default True) – Use first heading in slide content as slide title.
template_path (str or None, default None) – Path to .odp template file. If None, uses default blank template.
default_font (str, default "Liberation Sans") – Default font for slide content.
default_font_size (int, default 18) – Default font size in points for body text.
title_font_size (int, default 44) – Font size for slide titles.
network (NetworkFetchOptions, default NetworkFetchOptions()) – Network security options for fetching remote images in slides.
include_notes (bool, default True) – Whether to detect and render speaker notes from “Speaker Notes” sections. When True, H3 headings with “Speaker Notes” text are detected, and content after them is rendered to slide speaker notes. When False, speaker notes sections are ignored and rendered as regular slide content.
comment_mode ({"native", "visible", "ignore"}, default "native") – How to render Comment and CommentInline AST nodes: - “native”: Use ODF annotation elements (default) - “visible”: Render as visible text in slide content - “ignore”: Skip comments entirely
- slide_split_mode: Literal['separator', 'heading', 'auto'] = 'auto'
- slide_split_heading_level: int = 2
- default_layout: str = 'Default'
- title_slide_layout: str = 'Title'
- use_heading_as_slide_title: bool = True
- template_path: str | None = None
- default_font: str = 'Liberation Sans'
- default_font_size: int = 18
- title_font_size: int = 44
- network: NetworkFetchOptions
- include_notes: bool = True
- comment_mode: Literal['native', 'visible', 'ignore'] = 'native'
- __init__(fail_on_resource_errors: bool = False, max_asset_size_bytes: int = 52428800, metadata_policy: MetadataRenderPolicy = <factory>, creator: str | None = 'all2md', slide_split_mode: SlideSplitMode = 'auto', slide_split_heading_level: int = 2, default_layout: str = 'Default', title_slide_layout: str = 'Title', use_heading_as_slide_title: bool = True, template_path: str | None = None, default_font: str = 'Liberation Sans', default_font_size: int = 18, title_font_size: int = 44, network: NetworkFetchOptions = <factory>, include_notes: bool = True, comment_mode: OdpCommentMode = 'native') None