Documentation
¶
Overview ¶
Package source provides interfaces and implementations for loading content from various sources (Marp markdown, transcript JSON, config YAML).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigSource ¶
type ConfigSource struct {
// contains filtered or unexported fields
}
ConfigSource loads content from a unified config file (YAML/JSON). It supports mixed slide and browser segments.
func NewConfigSource ¶
func NewConfigSource(cfg *config.VideoConfig) *ConfigSource
NewConfigSource creates a source from a config
func NewConfigSourceFromFile ¶
func NewConfigSourceFromFile(path string) (*ConfigSource, error)
NewConfigSourceFromFile loads a config from a YAML/JSON file
func (*ConfigSource) GetConfig ¶
func (s *ConfigSource) GetConfig() *config.VideoConfig
GetConfig returns the underlying config
func (*ConfigSource) GetFilePath ¶
func (s *ConfigSource) GetFilePath() string
GetFilePath returns the source file path
func (*ConfigSource) GetMetadata ¶
func (s *ConfigSource) GetMetadata() Metadata
GetMetadata returns presentation-level metadata
type ContentSource ¶
type ContentSource interface {
// Load parses the source and returns segments
Load() ([]segment.Segment, error)
// GetMetadata returns presentation-level metadata
GetMetadata() Metadata
}
ContentSource represents a source of content that can be loaded into segments.
type Metadata ¶
type Metadata struct {
// Title is the presentation title
Title string
// Description is an optional description
Description string
// DefaultLanguage is the BCP-47 language code
DefaultLanguage string
// DefaultVoice is the default TTS voice configuration
DefaultVoice transcript.VoiceConfig
// Languages is the list of languages available
Languages []string
// Tags for organization
Tags []string
// Custom metadata
Custom map[string]string
}
Metadata contains presentation-level settings
type RenderableSource ¶
type RenderableSource interface {
ContentSource
// Render generates visual content (images, HTML) for the segments.
// outputDir is where rendered files should be written.
// Returns paths to rendered files indexed by segment ID.
Render(outputDir string) (map[string]string, error)
}
RenderableSource extends ContentSource for sources that can render visual content.
type TranscriptSource ¶
type TranscriptSource struct {
// contains filtered or unexported fields
}
TranscriptSource loads content from a transcript JSON file. It supports both slide and browser segments via the sourceType field.
func NewTranscriptSource ¶
func NewTranscriptSource(t *transcript.Transcript) *TranscriptSource
NewTranscriptSource creates a source from a transcript
func NewTranscriptSourceFromFile ¶
func NewTranscriptSourceFromFile(path string) (*TranscriptSource, error)
NewTranscriptSourceFromFile loads a transcript from a JSON file
func (*TranscriptSource) GetFilePath ¶
func (s *TranscriptSource) GetFilePath() string
GetFilePath returns the source file path
func (*TranscriptSource) GetMetadata ¶
func (s *TranscriptSource) GetMetadata() Metadata
GetMetadata returns presentation-level metadata
func (*TranscriptSource) GetTranscript ¶
func (s *TranscriptSource) GetTranscript() *transcript.Transcript
GetTranscript returns the underlying transcript