2026-09-19 17:54:18 -04:00
|
|
|
"""The catena libraries, in process.
|
|
|
|
|
|
|
|
|
|
Every function here is the same code the command-line tool runs, and hands
|
|
|
|
|
back the same record shapes it writes to stdout — dictionaries rather than
|
|
|
|
|
lines of JSON.
|
|
|
|
|
|
|
|
|
|
>>> import catena
|
|
|
|
|
>>> chunks = catena.chunk_markdown(markdown, target=512)
|
|
|
|
|
>>> chunks[0]["page"]
|
|
|
|
|
41
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from ._catena import (
|
|
|
|
|
__version__,
|
2026-09-20 09:12:04 -04:00
|
|
|
cue_windows,
|
2026-09-19 17:54:18 -04:00
|
|
|
chunk_markdown,
|
|
|
|
|
count_tokens,
|
|
|
|
|
fuse_hits,
|
|
|
|
|
identify,
|
|
|
|
|
pack_cues,
|
2026-09-19 19:19:54 -04:00
|
|
|
parse_identifier,
|
2026-09-19 17:54:18 -04:00
|
|
|
parse_subtitles,
|
|
|
|
|
scrub,
|
2026-09-20 09:00:26 -04:00
|
|
|
segment_cues,
|
2026-09-19 19:03:47 -04:00
|
|
|
series_of,
|
2026-09-19 17:54:18 -04:00
|
|
|
split_collection,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
"__version__",
|
2026-09-20 09:12:04 -04:00
|
|
|
"cue_windows",
|
2026-09-19 17:54:18 -04:00
|
|
|
"chunk_markdown",
|
|
|
|
|
"count_tokens",
|
|
|
|
|
"fuse_hits",
|
|
|
|
|
"identify",
|
|
|
|
|
"pack_cues",
|
2026-09-19 19:19:54 -04:00
|
|
|
"parse_identifier",
|
2026-09-19 17:54:18 -04:00
|
|
|
"parse_subtitles",
|
|
|
|
|
"scrub",
|
2026-09-20 09:00:26 -04:00
|
|
|
"segment_cues",
|
2026-09-19 19:03:47 -04:00
|
|
|
"series_of",
|
2026-09-19 17:54:18 -04:00
|
|
|
"split_collection",
|
|
|
|
|
]
|