plugin

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package plugin defines the public protocol for convertr external plugins.

A plugin is an executable named convertr-<NAME> that implements two sub-commands:

convertr-NAME capabilities
    Writes a JSON array of Capability objects to stdout and exits 0.

convertr-NAME convert --from FROM --to TO --input IN --output OUT [--opt key=value ...]
    Converts IN to OUT. Exits 0 on success, non-zero on failure.
    On failure, writes a single line error message to stderr.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capability

type Capability struct {
	From string `json:"from"` // source format ID (e.g. "md")
	To   string `json:"to"`   // target format ID (e.g. "html")
	Cost int    `json:"cost"` // routing cost (1–10; lower = preferred)
}

Capability describes one conversion edge a plugin can perform.

Jump to

Keyboard shortcuts

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