docconv

package
v0.0.0-...-44d23be Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 7 Imported by: 0

README

DOCX

This folder contains code copied from the github.com/sarai/docconv package.

I did not import the entire package; I took only what I needed for parsing the .docx file.

License

The code in this folder is released under The MIT License (MIT):

Copyright (c) 2014 Sajari Pty Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Documentation

Overview

Package docconv is a copy of portions of the `github/sajari/docconv` package. It implements a DOCX to Plain Text converter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertDocx

func ConvertDocx(r io.Reader) (string, map[string]string, error)

ConvertDocx converts an MS Word docx file to text.

func DocxXMLToText

func DocxXMLToText(r io.Reader) (string, error)

DocxXMLToText converts Docx XML into plain text.

func XMLToMap

func XMLToMap(r io.Reader) (map[string]string, error)

XMLToMap converts XML to a nested string map.

func XMLToText

func XMLToText(r io.Reader, breaks []string, skip []string, strict bool) (string, error)

XMLToText converts XML to plain text given how to treat elements.

Types

This section is empty.

Jump to

Keyboard shortcuts

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