25 lines
801 B
Go
25 lines
801 B
Go
// only-office's Go part (novox/hq ADR 0468 §7): the tool side of the seat `document-converter`. A caller asks to
|
|
// have a document turned into a PDF, by a signed link to read it from and a signed link to put the PDF to; the
|
|
// tool side queues the ask for the module's `converter` process (issue 1596) and reads its answer. It holds no
|
|
// credential: the document server's token is the process's alone (ADR 0436 §12).
|
|
//
|
|
// stdout is the MCP channel; what this module says, it says on stderr.
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
stdio "git.novox.be/novox/mesh-sdk/go"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) > 1 && os.Args[1] == "converter" {
|
|
os.Exit(converter())
|
|
}
|
|
if err := stdio.Serve("", tools(newService())); err != nil {
|
|
fmt.Fprintf(os.Stderr, "[only-office] %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|