Organize generic and Seriatim modules by domain

This commit is contained in:
2026-07-17 04:57:47 +00:00
parent 0327659355
commit a81b9f1e1f
36 changed files with 83 additions and 78 deletions

View File

@@ -0,0 +1,28 @@
package transcript
import (
"encoding/json"
"gitea.maximumdirect.net/eric/notarius/internal/core/source"
)
const (
MetadataSpeaker = "speaker"
MetadataStart = "start"
MetadataEnd = "end"
)
func Speaker(unit source.SourceUnit) (string, bool) {
value, ok := unit.Metadata[MetadataSpeaker].(string)
return value, ok
}
func Start(unit source.SourceUnit) (json.Number, bool) {
value, ok := unit.Metadata[MetadataStart].(json.Number)
return value, ok
}
func End(unit source.SourceUnit) (json.Number, bool) {
value, ok := unit.Metadata[MetadataEnd].(json.Number)
return value, ok
}