wincommands

package module
v0.0.0-...-043c747 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 8 Imported by: 2

README

# Wincommands

Wincommands defines some helper funcs for doing digital preservation workflow activities on a Windows machine. Manages things like file copy, thumbnail creation, etc.

  

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractText

func ExtractText(input, outdir, outname string, overwrite bool) error

ExtractText extracts text from input and writes it to the outname in outdir

func FileCopy

func FileCopy(input, outdir string, overwrite bool) error

FileCopy uses robocopy to copy a file input to outdir

func FileCopyLog

func FileCopyLog(lg io.Writer, input, outdir string, overwrite bool) error

FileCopy log copies a file from input to outdir using xcopy and logs the copy action to the provided log writer

func IsPDF

func IsPDF(puid string) bool

IsPDF tests a PUID against the PDF formats

func IsText

func IsText(puid string) bool

IsText tests a PUID against the text formats

func IsWord

func IsWord(puid string) bool

IsWord tests a PUID against the MS Word formats

func MakeDir

func MakeDir(dir string) (error, bool)

MakeDir creates a directory, unless one already exists. Returns an error and a boolean that indicates whether the directory already exists.

func SetFFMpegPath

func SetFFMpegPath(p string)

SetFFMpegPath sets your install directory for FFMpeg

func SetImageMPath

func SetImageMPath(p string)

SetImageMPath sets your install directory for Image Magick

func SetLibreOPath

func SetLibreOPath(p string)

SetLibreOPath sets your install directory for Libre Office

func SetThumb

func SetThumb(x, y int)

SetThumb defines your preferences for thumbnail dimensions (provide x and y values)

func SetTikaPath

func SetTikaPath(p string)

SetTikaPath sets your install directory for Tika

func SetTimeout

func SetTimeout(t time.Duration)

SetTimeout sets a timeout for actions

func Thumbnail

func Thumbnail(input, outdir, outname string, overwrite bool) error

Thumbnail creates a thumbnail of input in outname in outdir

func WordToPdf

func WordToPdf(input, outdir string, overwrite bool) (string, error)

WordToPdf turns a word doc at input into a PDF file in outdir

Types

This section is empty.

Jump to

Keyboard shortcuts

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