Skip to main content

Module timeline

Module timeline 

Source
Expand description

Multitrack timeline views. Port of timeline_viz.py.

The HTML pageโ€™s ~900 lines of CSS and JavaScript live in templates/timeline.html.tmpl, rendered out of the reference Python by tools/templates/extract.py with a marker for each dynamic value.

Structsยง

TimelineData
TimelineData: the five layers, plus section and scene bands.

Constantsยง

HTML_TEMPLATE ๐Ÿ”’

Functionsยง

band_json ๐Ÿ”’
build_timeline_data
build_timeline_data(...).
fmt_mmss_tenths ๐Ÿ”’
_fmt_mmss_tenths(seconds) โ€” M:SS.t, right-aligned to 7.
format_time
_format_time(seconds) โ€” M:SS.
opt_json ๐Ÿ”’
rel_audio ๐Ÿ”’
os.path.relpath(full, out_dir) with / separators and an mtime cache-buster.
render_html_timeline
render_html_timeline(data, output_path, stems_dir, slug=, tag=, layers_dir=).
render_terminal_timeline
render_terminal_timeline(data).
render_terminal_timeline_width
render_text_timeline_map
render_text_timeline_map(data, output_path, slug=...).
span_json ๐Ÿ”’
stdout_columns ๐Ÿ”’
terminal_columns ๐Ÿ”’
shutil.get_terminal_size((120, 24)).columns.