It's a cli wrapper for tty2web and all functionality is provided by the tty2web binary.
It's simply a command builder and runner for tty2web.
go get github.com/Lutz-Pfannenschmidt/libtty2web
Every tty2web option is available as a function in the libtty2web package using the With
prefix. (e.g. libtty2web.WithPermitWrite()
)
to see all features and options of tty2web, please visit the tty2web repository, run tty2web --help
or use the GetHelpMsg()
function from go.
For example, tty2web --help
will output:
...
--jsurl value Specify string for custom URL serving Javascript files...
...
To use this option in libtty2web, you can use the libtty2web.WithJsUrl("someDir")
function.
package main
import "github.com/Lutz-Pfannenschmidt/libtty2web"
func main() {
test := libtty2web.NewTty2Web("bash")
test.SetBinary("tty2web")
test.AddOptions(
libtty2web.WithPermitWrite(),
libtty2web.WithOnce(),
)
err := test.Run()
if err != nil {
panic(err)
}
test.Wait()
}