Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportItems ¶
func ExportItems(foreignSubs, nativeSubs *subs.Subtitles, outputBase, mediaSourceFile, mediaPrefix string, write ExportedItemWriter) error
ExportItems calls the write function for each foreign subtitle item.
Types ¶
type ExportedItem ¶
type ExportedItem struct { Sound string Time string Source string Image string ForeignCurr string NativeCurr string ForeignPrev string NativePrev string ForeignNext string NativeNext string }
ExportedItem represents the exported information of a single subtitle item, where Time is the primary field which identifies the item and ForeignCurr is the actual text of the item. The fields NativeCurr, NativePrev and NativeNext will be empty unless a second subtitle file was specified for the export and that second subtitle file is sufficiently aligned with the first.
func ExportItem ¶
type ExportedItemWriter ¶
type ExportedItemWriter func(*ExportedItem) error
ExportedItemWriter should write an exported item in whatever format is selected by the user.
type ExtractCards ¶
type ExtractCards struct { ForeignSubtitlesFile string NativeSubtitlesFile string MediaSourceFile string OutputFieldSeparator string // defaults to "\t" OutputFileExtension string // defaults to ".tsv" for "\t" and ".csv", otherwise }
ExtractCards specifies the parameters for generating a CSV export of the given foreign subtitles. The fields NativeSubtitles and MediaSource are optional.
func (*ExtractCards) Execute ¶
func (e *ExtractCards) Execute() error