Documentation
¶
Index ¶
- type Docling
- func (instance *Docling) Environment() (response []string)
- func (instance *Docling) InitializeAll() (response []string, err error)
- func (instance *Docling) Install() (response string, err error)
- func (instance *Docling) IsInstalled() (response bool)
- func (instance *Docling) PrefetchAll() (response string, err error)
- func (instance *Docling) To(source string, outFormat string, options ...string) (response string, err error)
- func (instance *Docling) ToMarkdown(source string, options ...string) (response string, err error)
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 (*Docling) InitializeAll ¶
InitializeAll initializes the Docling application by checking its installation and installing if necessary.
func (*Docling) Install ¶
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 ¶
IsInstalled checks if the "docling" application is installed in the Python virtual environment.
func (*Docling) PrefetchAll ¶
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 ¶
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.