84 lines
4.1 KiB
Markdown
84 lines
4.1 KiB
Markdown
---
|
|
name: extract-transcript
|
|
description: Extract the meeting transcript from a saved Fireflies.ai (or similar) .mhtml page capture into a Markdown file. Use when the user asks to "extract the transcript", "convert this mhtml to a transcript", "get the transcript out of this mhtml file", or provides a `.mhtml` meeting recording file and wants the transcript pulled out. Takes one filename argument.
|
|
---
|
|
|
|
# Extract transcript skill
|
|
|
|
## Purpose
|
|
|
|
Fireflies.ai (and similar tools) render meeting transcripts client-side,
|
|
behind login - `WebFetch` and plain `curl`/headless-browser scraping only
|
|
see the app shell, never the transcript. The reliable workaround is for the
|
|
user to save the fully-rendered meeting page as a browser `.mhtml` page
|
|
capture (File > Save Page As > Webpage, Single File, or the browser's
|
|
"Save as MHTML" option). This skill turns that `.mhtml` capture into a
|
|
clean Markdown transcript, deterministically - no model reasoning needed.
|
|
|
|
## How to run this skill
|
|
|
|
Run the bundled script with Bash, passing the `.mhtml` file path as the
|
|
only argument:
|
|
|
|
```bash
|
|
python3 "<skill-dir>/scripts/extract_transcript.py" "<path/to/file.mhtml>"
|
|
```
|
|
|
|
Resolve `<skill-dir>` to this skill's own directory (the directory
|
|
containing this SKILL.md) and `<path/to/file.mhtml>` to the file the user
|
|
gave you - accept it whether they pasted an absolute path, a relative
|
|
path, or just referenced an open/attached file.
|
|
|
|
The script:
|
|
- Parses the `.mhtml` as a MIME multipart message (Python's `email`
|
|
module) and finds the rendered HTML part(s).
|
|
- Locates the transcript panel (`id` ending in `content-transcript`, or
|
|
falls back to the largest `ScrollArea-styled__Root` element) and walks
|
|
its structured DOM - per-paragraph speaker name, timestamp, and sentence
|
|
text - rather than flattening all text, which would lose speaker
|
|
boundaries.
|
|
- Extracts the page `<title>` and a best-effort meeting date/time from the
|
|
page text.
|
|
- Writes the output next to the input file, same directory and basename,
|
|
with a `.md` extension (e.g. `Team sync.mhtml` -> `Team sync.md`),
|
|
overwriting any existing file at that path.
|
|
|
|
If `beautifulsoup4` isn't installed, the script exits with the exact
|
|
`pip3 install beautifulsoup4` command to run - run it, then retry.
|
|
|
|
## After running
|
|
|
|
Report the output path and the number of transcript lines extracted (the
|
|
script prints both). Do not summarize or otherwise process the transcript
|
|
unless the user separately asks for that (e.g. ingesting it into the
|
|
wiki) - this skill's job ends at producing the `.md` file.
|
|
|
|
The script also detects and reports two common capture mistakes rather
|
|
than silently producing bad output:
|
|
|
|
- **Wrong tab active:** if the page was saved while a tab other than
|
|
Transcript was open (commonly Notes), Fireflies never mounted the
|
|
transcript panel into the DOM at all. The script detects this and tells
|
|
the user to reopen the meeting, click Transcript, and re-save.
|
|
- **Incomplete scroll:** Fireflies virtualizes the transcript list, so if
|
|
the user didn't scroll all the way through it before saving, only the
|
|
visible portion is captured and the rest is silently missing (not a
|
|
quiet stretch of the meeting). The script still writes the `.md` file in
|
|
this case but prints a warning to stderr for any gap of 90+ seconds
|
|
between consecutive lines, with the exact timestamp range of each gap,
|
|
and the same "scroll to the end, then re-save" guidance. Pass this
|
|
warning on to the user rather than treating a successful "Wrote N lines"
|
|
message as automatically complete.
|
|
|
|
## Limitations
|
|
|
|
- Built against Fireflies.ai's current page structure (styled-components
|
|
class names change on redeploys, so a Fireflies UI change could break
|
|
the selectors - if extraction fails, inspect the `.mhtml`'s HTML part
|
|
for the new transcript container structure and update
|
|
`scripts/extract_transcript.py` accordingly).
|
|
- Only captures speakers and sentences visible in the saved page. If the
|
|
transcript panel wasn't fully scrolled/loaded before saving, only the
|
|
loaded portion will be present.
|
|
- Attendee list is inferred purely from who has transcript lines - silent
|
|
attendees who never spoke won't appear.
|