all2md.options.fb2
Configuration options for FB2 (FictionBook 2.0) parsing.
This module defines parser options for FictionBook 2.0 ebook conversion.
- class all2md.options.fb2.Fb2Options
Bases:
BaseParserOptions,AttachmentOptionsMixinConfiguration options for FB2-to-AST conversion.
Inherits attachment handling from AttachmentOptionsMixin for embedded images in FictionBook 2.0 ebooks.
- Parameters:
include_notes (bool, default True) – Whether to include bodies/sections marked as notes in the output.
notes_section_title (str, default "Notes") – Heading text to use when appending collected note sections.
fallback_encodings (tuple[str, ...], default ("utf-8", "windows-1251", "koi8-r")) – Additional encodings to try when the XML declaration is missing or parsing fails with the declared encoding.
- include_notes: bool = True
- notes_section_title: str = 'Notes'
- fallback_encodings: tuple[str, ...] = ('utf-8', 'windows-1251', 'koi8-r')
- __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, include_notes: bool = True, notes_section_title: str = 'Notes', fallback_encodings: tuple[str, ...] = ('utf-8', 'windows-1251', 'koi8-r')) None