Add preflight command and run alias
This commit is contained in:
@@ -14,11 +14,12 @@ type processInput struct {
|
||||
Transcript string
|
||||
Output commandkit.Supplied[string]
|
||||
Debug commandkit.Supplied[bool]
|
||||
Smoke commandkit.Supplied[bool]
|
||||
Overrides []ck.Override
|
||||
GlossaryFiles []string
|
||||
}
|
||||
|
||||
func processCommand() commandkit.Command {
|
||||
func processingFlags() []commandkit.Flag[processInput] {
|
||||
stringValue := func(s string) (string, error) { return s, nil }
|
||||
flags := []commandkit.Flag[processInput]{
|
||||
commandkit.RepeatFlag(commandkit.FlagMeta{Name: "glossary-file", Usage: "Runtime glossary file (repeatable)."}, nil, stringValue, func(in *processInput, v commandkit.Supplied[[]string]) { in.GlossaryFiles = v.Value }),
|
||||
@@ -94,9 +95,20 @@ func processCommand() commandkit.Command {
|
||||
in.Overrides = append(in.Overrides, ck.Override{Path: ck.Keys("reporting", "enabled"), Value: v.Value, Flag: "--reporting"})
|
||||
}
|
||||
}))
|
||||
return commandkit.NewCommand(commandkit.CommandSpec[processInput]{Name: "process", Summary: "Polish a transcript.", Flags: flags, Run: runProcess,
|
||||
Arguments: []commandkit.Argument[processInput]{commandkit.ValueArgument(commandkit.ArgumentMeta{Name: "transcript", Usage: "Transcript JSON file."}, true, stringValue, func(in *processInput, v commandkit.Supplied[string]) { in.Transcript = v.Value })},
|
||||
})
|
||||
return flags
|
||||
}
|
||||
|
||||
func transcriptArguments() []commandkit.Argument[processInput] {
|
||||
return []commandkit.Argument[processInput]{commandkit.ValueArgument(commandkit.ArgumentMeta{Name: "transcript", Usage: "Transcript JSON file."}, true, func(s string) (string, error) { return s, nil }, func(in *processInput, v commandkit.Supplied[string]) { in.Transcript = v.Value })}
|
||||
}
|
||||
|
||||
func processCommand() commandkit.Command {
|
||||
return commandkit.NewCommand(commandkit.CommandSpec[processInput]{Name: "process", Summary: "Polish a transcript.", Flags: processingFlags(), Run: runProcess, Arguments: transcriptArguments()})
|
||||
}
|
||||
|
||||
func preflightCommand() commandkit.Command {
|
||||
flags := append(processingFlags(), commandkit.BoolFlag(commandkit.FlagMeta{Name: "smoke", Usage: "Verify structured output with selected profiles."}, true, func(in *processInput, v commandkit.Supplied[bool]) { in.Smoke = v }))
|
||||
return commandkit.NewCommand(commandkit.CommandSpec[processInput]{Name: "preflight", Summary: "Check processing readiness.", Flags: flags, Run: runPreflight, Arguments: transcriptArguments()})
|
||||
}
|
||||
|
||||
func parseCollectionNames(raw string) (any, error) {
|
||||
|
||||
Reference in New Issue
Block a user