Kreuzberg.DjotContent (kreuzberg v4.4.2)

Copy Markdown View Source

Comprehensive Djot document structure with semantic preservation.

Matches the Rust DjotContent struct.

Fields

  • :plain_text - Plain text representation for backwards compatibility
  • :blocks - Structured block-level content
  • :metadata - Metadata from YAML frontmatter
  • :tables - Extracted tables as structured data
  • :images - Extracted images with metadata
  • :links - Extracted links with URLs
  • :footnotes - Footnote definitions
  • :attributes - Attributes mapped by element identifier

Summary

Types

t()

@type t() :: %Kreuzberg.DjotContent{
  attributes: [{String.t(), Kreuzberg.DjotAttributes.t()}],
  blocks: [Kreuzberg.DjotFormattedBlock.t()],
  footnotes: [Kreuzberg.DjotFootnote.t()],
  images: [Kreuzberg.DjotImage.t()],
  links: [Kreuzberg.DjotLink.t()],
  metadata: Kreuzberg.Metadata.t(),
  plain_text: String.t(),
  tables: [Kreuzberg.Table.t()]
}

Functions

from_map(data)

@spec from_map(map()) :: t()

to_map(djot)

@spec to_map(t()) :: map()