Help us shape the future of Go! Take the 2026 Go Developer Survey

officetext

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package officetext re-exports internal/officetext's native DOCX/PPTX/XLSX text extraction for external consumers (e.g. seshat-ai's upload and RAG ingestion pipelines) that want the same conversion the read_file tool uses without going through an external document-reader service.

Index

Constants

MinCharsPerSlide is re-exported for callers that want to reason about the PPTX sparse threshold directly (e.g. logging/diagnostics); Extract itself applies it automatically via sparse.

Variables

ErrEmpty is returned when a document parses but yields no extractable text.

SupportedExtensions lists the formats Extract can handle natively.

Functions

func Extract

func Extract(filename string, data []byte) (markdown string, ok bool, sparse bool, err error)

Extract converts a DOCX/PPTX/XLSX file's bytes to markdown. ok is false when filename's extension isn't natively supported. sparse is true when extraction "succeeded" but yielded implausibly little text for the format - currently only computed for PPTX, where a deck that's mostly screenshots/diagrams can parse fine while still needing OCR to get anything useful out of it. Callers should treat sparse the same way they already treat pdftext.Result.Sparse: prefer a document reader over trusting a sparse native result.

Types

This section is empty.

Jump to

Keyboard shortcuts

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