doctotext

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Doc To Text node

Type: docToText
Category: Parsers

Extracts text from a document payload (pdf/docx/odt/pptx/txt).

Behavior

This node is registered as docToText and runs as part of a workflow. Its exact runtime behavior is implemented in node.go; this document summarizes the editor-facing purpose and configuration contract.

Configuration

Field Type Default Description
format string auto Format — auto detects the format from the payload's magic bytes

Implementation

  • node.go contains the executor, validation, schema, and registration.
  • editor.html contains the editor integration.
  • node_test.go, when present, contains behavioral tests.

Documentation

Overview

Package doctotext contains the docToText node: it extracts text from a document payload (pdf/docx/odt/pptx/txt) — the inverse of the `pdf` node. Output: msg.Payload = extracted text; Metadata["doc"] = {sourceFormat, mime}.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocToTextConfig

type DocToTextConfig struct {
	// Format: "auto" (default — detect from magic bytes) or a forced
	// "pdf" | "docx" | "odt" | "pptx" | "txt".
	Format string `json:"format"`
}

DocToTextConfig holds the `docToText` node configuration.

type DocToTextNode

type DocToTextNode struct {
	*nodebase.BaseNode
	// contains filtered or unexported fields
}

DocToTextNode extracts text from a document payload — the inverse of `pdf`.

func NewDocToTextNode

func NewDocToTextNode(node nodestore.NodeInterface, cfg *DocToTextConfig) *DocToTextNode

NewDocToTextNode creates a new docToText node.

func (*DocToTextNode) Execute

Execute extracts the text and stamps the doc metadata.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL