Implement artifact-level render command with Markdown output and update docs
This commit is contained in:
38
docs/cli.md
38
docs/cli.md
@@ -16,6 +16,7 @@ go run ./cmd/seriatim merge \
|
||||
| `merge` | Merge one or more raw transcript JSON inputs into one seriatim artifact. |
|
||||
| `trim` | Keep or remove segment IDs from an existing seriatim artifact. |
|
||||
| `normalize` | Canonicalize transcript-like JSON into a seriatim artifact. |
|
||||
| `render` | Render an existing seriatim artifact as Markdown. |
|
||||
|
||||
Root usage:
|
||||
|
||||
@@ -130,6 +131,34 @@ Flags:
|
||||
- Does not run merge modules.
|
||||
- When `--output-schema` is omitted, schema resolution is: `SERIATIM_OUTPUT_SCHEMA` -> default `seriatim-intermediate`.
|
||||
|
||||
## `render`
|
||||
|
||||
Usage:
|
||||
|
||||
```text
|
||||
seriatim render [flags]
|
||||
```
|
||||
|
||||
Flags:
|
||||
|
||||
| Flag | Required | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `--input-file string` | Yes | none | Input seriatim artifact JSON file. |
|
||||
| `--output-file string` | Yes | none | Rendered output file path. |
|
||||
| `--format string` | Yes | none | Output format. Current supported value: `markdown`. |
|
||||
| `--title string` | No | `Transcript` | Markdown document title. |
|
||||
| `--include-timestamps` | No | `true` | Include `[HH:MM:SS–HH:MM:SS]` per segment. |
|
||||
| `--include-segment-ids` | No | `false` | Include `[#id]` marker per segment. |
|
||||
| `--include-metadata` | No | `false` | Include artifact metadata block near the top. |
|
||||
|
||||
`render` behavior:
|
||||
|
||||
- Input must be a valid existing seriatim output artifact (`seriatim-minimal`, `seriatim-intermediate`, or `seriatim-full`).
|
||||
- Raw WhisperX-style JSON is rejected.
|
||||
- `render` does not execute merge/trim/normalize transformations.
|
||||
- Markdown output is deterministic for the same input artifact and render flags.
|
||||
- Category names are not printed directly; `background`, `backchannel`, and `filler` only influence italics.
|
||||
|
||||
## Common workflows
|
||||
|
||||
Merge with a speaker map and report output:
|
||||
@@ -160,6 +189,15 @@ go run ./cmd/seriatim normalize \
|
||||
--output-file /tmp/seriatim-example-normalize-object.json
|
||||
```
|
||||
|
||||
Render an existing artifact as Markdown:
|
||||
|
||||
```sh
|
||||
go run ./cmd/seriatim render \
|
||||
--input-file examples/render/input-intermediate.json \
|
||||
--output-file /tmp/seriatim-example-render.md \
|
||||
--format markdown
|
||||
```
|
||||
|
||||
## Exit and errors
|
||||
|
||||
- Commands return exit code `0` on success.
|
||||
|
||||
Reference in New Issue
Block a user