Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Backend ¶
type Backend interface {
Name() string
BinaryName() string
Capabilities() []Capability
Convert(ctx context.Context, in, out string, opts Options) error
}
Backend is the interface every converter must satisfy.
type Capability ¶
type Capability struct {
From string
To string
Cost int // 1=fast, 5=slow/lossy
Quality int // 0-100
Lossy bool
}
Capability declares a single From→To conversion that a backend can perform.
func AllCapabilities ¶
func AllCapabilities() []Capability
AllCapabilities returns every declared capability across all backends.
type ConvertError ¶
ConvertError wraps a backend error with routing context.
func (*ConvertError) Error ¶
func (e *ConvertError) Error() string
func (*ConvertError) Is ¶
func (e *ConvertError) Is(target error) bool
Is makes ConvertError satisfy errors.Is(err, ErrConvertFail) for retry logic.
func (*ConvertError) Unwrap ¶
func (e *ConvertError) Unwrap() error
Directories
¶
| Path | Synopsis |
|---|---|
|
backends
|
|
|
asciidoctor
Package asciidoctor provides AsciiDoc conversion via the asciidoctor binary.
|
Package asciidoctor provides AsciiDoc conversion via the asciidoctor binary. |
|
csvkit
Package csvkit provides CSV/XLSX/JSON conversion via csvkit or xlsx2csv.
|
Package csvkit provides CSV/XLSX/JSON conversion via csvkit or xlsx2csv. |
|
ffmpeg
Package ffmpeg provides audio/video conversion via the ffmpeg binary.
|
Package ffmpeg provides audio/video conversion via the ffmpeg binary. |
|
figlet
Package figlet converts plain text to ASCII art via the figlet binary.
|
Package figlet converts plain text to ASCII art via the figlet binary. |
|
imagemagick
Package imagemagick provides image conversion via ImageMagick (magick or convert).
|
Package imagemagick provides image conversion via ImageMagick (magick or convert). |
|
jq
Package jq provides JSON formatting/transformation via the jq binary.
|
Package jq provides JSON formatting/transformation via the jq binary. |
|
libreoffice
Package libreoffice provides a backend that delegates to soffice (LibreOffice).
|
Package libreoffice provides a backend that delegates to soffice (LibreOffice). |
|
pandoc
Package pandoc provides a backend that delegates conversions to pandoc.
|
Package pandoc provides a backend that delegates conversions to pandoc. |
|
plugin
Package plugin discovers and registers external convertr-* executables as backends.
|
Package plugin discovers and registers external convertr-* executables as backends. |
|
tesseract
Package tesseract provides OCR via the tesseract binary.
|
Package tesseract provides OCR via the tesseract binary. |
|
textutil
Package textutil provides a macOS-native backend using the textutil(1) command.
|
Package textutil provides a macOS-native backend using the textutil(1) command. |
|
yq
Package yq provides YAML/JSON/TOML conversion via the yq binary.
|
Package yq provides YAML/JSON/TOML conversion via the yq binary. |
Click to show internal directories.
Click to hide internal directories.