Skip to content

Readers

transcript_indexer.readers

UnsupportedFormatError

Bases: Exception

No registered reader matched the given path.

Source code in src/transcript_indexer/readers/__init__.py
class UnsupportedFormatError(Exception):
    """No registered reader matched the given path."""

MalformedSourceError

Bases: Exception

A reader matched the path but failed to parse its contents.

Source code in src/transcript_indexer/readers/__init__.py
class MalformedSourceError(Exception):
    """A reader matched the path but failed to parse its contents."""

    def __init__(self, path: Path, reason: str) -> None:
        super().__init__(f"{path}: {reason}")
        self.path = path
        self.reason = reason

transcript_indexer.readers.otter

Reader for Otter-format speaker-turn transcripts.

Filename: YYYYMMDD HHMM - title.txt

Otter has shipped several distinct turn-header layouts over the years, so the parser detects which one a file uses by counting candidate matches per format, then re-parses with the winner.

Supported formats:

  • timestamped<speaker> <[H:]MM:SS> (one or more spaces, optional trailing colon). Body on subsequent lines, terminated by a blank line.
  • name_only<speaker> alone on a line, body on the following lines, terminated by a blank line.
  • inline<speaker>: <body> all on one line; one line per turn.