pyapp_docling

package
v0.3.75 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: BSD-3-Clause Imports: 7 Imported by: 1

README

Docling

Docling simplifies document processing, parsing diverse formats — including advanced PDF understanding — and providing seamless integrations with the gen AI ecosystem.

https://github.com/docling-project/docling

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docling

type Docling struct {
	// contains filtered or unexported fields
}

Docling represents an abstraction for managing the "Docling" application within a Python virtual environment. Convert for: docx | pptx | html | image | pdf | asciidoc | md | csv | xlsx | xml_uspto | xml_jats | json_docling To: md | json | html | text | doctags https://ds4sd.github.io/docling/reference/cli/

func NewDocling

func NewDocling(venv pyvenv_commons.IVenv) (instance *Docling)

NewDocling creates and initializes a new Docling instance with the provided Python virtual environment.

func (*Docling) Environment added in v0.3.65

func (instance *Docling) Environment() (response []string)

func (*Docling) InitializeAll

func (instance *Docling) InitializeAll() (response []string, err error)

InitializeAll initializes the Docling application by checking its installation and installing if necessary.

func (*Docling) Install

func (instance *Docling) Install() (response string, err error)

Install installs the "docling" package within the Python virtual environment using pip. Returns the response and error. https://ds4sd.github.io/docling/installation/

func (*Docling) IsInstalled

func (instance *Docling) IsInstalled() (response bool)

IsInstalled checks if the "docling" application is installed in the Python virtual environment.

func (*Docling) PrefetchAll

func (instance *Docling) PrefetchAll() (response string, err error)

PrefetchAll downloads all available models for the "Docling" application using the "docling-tools models download" command. Returns the command response or an error if the operation fails or the application is not installed. https://docling-project.github.io/docling/usage/#advanced-options

func (*Docling) To added in v0.3.50

func (instance *Docling) To(source string, outFormat string, options ...string) (response string, err error)

To converts a given source file to a specified output format using the "Docling" application. Returns the result or an error. Sample Usage: To("md", "--image-export-mode", "placeholder") // remove images

func (*Docling) ToMarkdown

func (instance *Docling) ToMarkdown(source string, options ...string) (response string, err error)

ToMarkdown converts a given source file into a Markdown file using the "Docling" application and returns the content. Returns an error if the source file doesn't exist or if the "Docling" application is not installed.

Jump to

Keyboard shortcuts

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