Skip to main content

Script meetings/bin/meeting-follow

./bin/meeting-follow

ReadDisplay the transcript while it is generated.

#!/usr/bin/env bash
set -euo pipefail

BASE="$HOME/meetings/recordings"

# Wait until at least one session directory exists
while [[ ! -d "$BASE" ]] || ! ls -d "$BASE"/* >/dev/null 2>&1; do
  sleep 0.5
done

SESSION="${1:-$(ls -d "$BASE"/* | tail -n1)}"
TRANSCRIPT="$SESSION/transcript.txt"

echo "📄 Following transcript:"
echo "   Session: $SESSION"
echo "   File:    $TRANSCRIPT"
echo "----"

# Wait until transcript file exists
while [[ ! -f "$TRANSCRIPT" ]]; do
  sleep 0.5
done

tail -f "$TRANSCRIPT"

Expected behaviour:

meeting-follow will check the file $HOME/meetings/recordings/.current if an active transcript session exists. If not, it waits until the information about the active session has been added by meeting-start and will then start displaying the transcript.