Spaces:
Running
Running
Commit History
-
feat: images mode without a transcript needs no HH-MM-SS filenames
ClaudeWhen no transcript is uploaded there's no narration to align, so slide timestamps are pointless. Names now only matter when a transcript is present: * With a transcript: filenames must carry HH-MM-SS (unchanged) so narration lines up by time. * Without a transcript: build_frames_ordered_by_name sorts slides by natural filename order (slide2 before slide10) and assigns synthetic positions — no timestamp parsing, any names work. Such segments are marked "untimed": build_segments titles them "Slide N" (not "Segment N — 0:0N") and both the guide and editor templates suppress the start–end time label, which would otherwise show meaningless synthetic values. Threaded via PipelineInputs.untimed and a new Segment.untimed field. The /jobs/from-images endpoint picks the builder by whether a transcript was provided; images.html explains both cases. Tests: natural-sort ordering with no timestamps; untimed render omits meta-time and titles "Slide N"; the timed path still shows the label. …bbe4867
-
rename: the app is now "The Describatron"
ClaudeRebrand the user-facing name from "Video Guide Maker" to "The Describatron" — and de-video the copy now that it also builds guides from slide images: * Page titles + headers across index / images / edit pages. * FastAPI app title; published-guide and editor footers. * README (HF Space card title + emoji 🎬→🤖 + heading), USER_GUIDE and DATA_HANDLING headings, and the intro prose. * Index eyebrow + sample copy: "lecture video (or slide images) and a transcript" instead of video-only. Infrastructure identifiers left untouched: the GitHub repo (VideoGuideMaker), the HF Space (Video2Guide), the internal package/ logger name (videoguidemaker), and DEPLOY.md's paths — those are real names, not branding. https://claude.ai/code/session_01EM8jiYxdVFy1w3LeJ9GBJg2f32611
-
fix: persist and honor per-element include toggles (bug audit cluster 1+2)
ClaudeAdversarial bug audit found the per-element include toggles (added this week) were DOM-only state that neither survived Save/Load JSON nor was honored by the server-side render path (Download ZIP, CLI --metadata). Result: a user who curated which blocks carry over got a ZIP that contradicted Download final HTML, and Save→reopen→Load silently reset every toggle to defaults. Also fixes an a11y regression where a duplicate contenteditable-strip made the ARIA-cleanup pass dead code. Persistence (review.html): * readState now serializes alt_text_included, on_screen_text_included, transcript_included, audio_included (description_included already existed), plus page lang and meta_lines (were dropped, resetting a non-English guide to lang=en and losing header metadata on ZIP re-render). * applyState restores all five per-element flags and lang via a shared applyElementInclude helper; a Load JSON refreshes the bulk-toggle indicators. * Description read/write now uses innerText (not…9a3cbf9
-
a11y pass for accessibility expert review
ClaudeAudit-and-fix pass on the published-guide and editor templates before sending it for an external accessibility review (Rich Caloggero, MIT DSL). Published guide (guide.html / _doc_styles.html): * Drop role="presentation" from decorative <img alt="">. alt="" alone is the WAI-recommended decorative-image pattern; role="presentation" on <img> has spotty AT support — some readers ignore it, others still announce the image. Empty alt is sufficient and more reliable. * Drop the redundant aria-label on <details class="onscreen-text">. The <summary> is the accessible name; layering aria-label on top either overrides the visible summary (WCAG 2.5.3 Label in Name mismatch) or duplicates it. Remove. * Only emit audio aria-describedby="narration-N" when the narration block it points at is actually rendered. A dangling describedby is an ARIA validity bug (WCAG 4.1.2 / 1.3.1) and some screen readers silently swallow the relationship, leaving the audio undescribed. * Bump TOC link…5a2d8c8 -
editor: per-element alt-text and transcript toggles; rename 'Scene description'
ClaudeThree pieces of UX feedback: * Alt-text now has its own include checkbox in the per-section "Include in published guide" fieldset, default OFF. When off, buildFinalHTML blanks the <img alt> at download time. Because alt is an attribute (not a discrete element), the checkbox writes its state to data-include-alt-text on the section and buildFinalHTML reads it alongside the description-present check; the helper attribute is stripped from the final HTML. * Narration sections are now rendered as <details class="narration"> with summary "Transcript", collapsed by default — in both the editor view and the server-side render (guide.html). A matching per-element include checkbox sits in the fieldset, also default OFF, so transcripts no longer carry over to the published guide unless the editor explicitly opts in. The narration body keeps its stable id so any audio aria-describedby reference still resolves; when transcript is excluded the strip pass collects removed…0c2c651
-
editor: remove summary / key-terms / self-check (round 3)
ClaudeAccessibility team's round-three asks: * "Summary Field — redundant, remove" (now subsumed by the new detailed description paragraph from PR 2) * "Key Terms — REMOVE. This replicates the glossary." * "Self-check questions — REMOVE! This is an academic role and such questions are better placed in the platform." Scope of removal: * Editor (review.html): drops the summary <input>, the key-terms list editor block, the self-check-questions list editor block, the related CSS rules (.vgm-key-term-row, .vgm-self-check-row), the readState/applyState/syncBindings hooks, the makeKeyTermRow / makeSelfCheckRow row factories, the add-key-term / add-self-check click handlers, and the entire glossary/highlight injection inside buildFinalHTML. * Published guide (guide.html): drops the "In brief:" advance organizer, the self-check <details> block, the bottom glossary section, the highlight_terms filter usage on narration, and the build_glossary call at the top of <main>. * LLM (ll…b863381 -
editor: long-form image description field (round 2)
ClaudeAdds the "Detailed description" field the accessibility team asked for — an editable open paragraph rendered UNDER the slide image that doubles as the long-form image description. When non-empty AND included in the published guide, the <img alt> drops to "" and the image is marked role="presentation": the description carries the meaning in body text where sighted AND non-sighted readers both encounter it, so there's no need to duplicate it inside an alt attribute that only screen readers hear. The pieces: * SegmentMetadata + Segment + migration gain description / description_ reviewed fields. Round-trips through Save/Load JSON. * New LLMToggles.description toggle. _FIELD_PROMPTS adds a description prompt that follows the team's example ("A gallery of purple flower stem macro photographs is shown. These demonstrate..."), and the structured-output schema gains a matching description field that only fires when the toggle is on (no wasted output tokens otherwise). * Orchestra…cf53b59
-
Accessibility: drop prohibited aria-labelledby from no-role narration div
ClaudeAxe-core's wcag2aa+best-practice scan against a freshly-rendered guide returned 0 violations but flagged the narration__body div's aria-labelledby="narration-label-N" as an incomplete (potentially prohibited) ARIA attribute. <div> has no implicit role, so the attribute has no name slot to fill and many AT will ignore it anyway — the sr-only <h3>Narration</h3> sibling already labels the block via standard heading semantics. Drop aria-labelledby from both guide.html and review.html. Keep the id on the inner div so the section's <audio> element's aria-describedby can still point at the narration text. Re-running axe after the change: 0 violations, 0 incomplete, 43 passes. WCAG 2.2 AA clean on the rendered guide.3c265ff -
Accessibility: term tooltips become real <a> links to glossary entries
ClaudeThe narration's inline highlighter wrapped each defined term in a <mark class="kt" title="…"> with the definition only in the title attribute. WCAG 2.5.1 / 4.1.2 — touch users can't trigger hover, keyboard users can't focus a <mark>, many screen readers skip the title attribute entirely. Definitions were effectively unavailable to roughly half of likely users. Build the glossary once at the top of <main> and pass it to the highlighter so each first-occurrence wrap becomes <a class="kt" href="#glossary-N" title="…">term</a> — focusable, touch-tappable, screen-reader announced as a link to the named target. The bottom glossary's <dt> ids match the hrefs the highlighter emits (build_glossary now stamps each entry with its own `id` field so server template and JS port share the contract). Terms with no glossary entry (defensive) fall back to the old <mark> shape. Mirror in buildFinalHTML: build the glossary entries before walking sections, thread the lookup through highlightTerms, reus…c28a145 -
Cleaner study-guide output: drop redundant per-section key-term list
ClaudeUser feedback: with inline term highlighting AND a bottom glossary, showing the same vocabulary again as a per-section <dl class="key-term"> was triple-redundant and visually noisy. - Drop the per-section <dl class="key-term"> from guide.html. Definitions remain accessible two ways: - inline via the .kt highlighter (hover tooltip on the first occurrence in each paragraph) - at the end of the document via the auto-built glossary (alphabetised, back-anchored to source section). - Mirror in buildFinalHTML so downloaded HTML matches. - Update test_render_guide_renders_key_terms_and_equations to expect the glossary instead of the per-section list. Also cleaned up two other visually-noisy bits while in the same file: - Figure's "Lecture slide." caption: redundant with the section heading + meta-time line and the figure-internal timestamp badge. Now we only emit a figcaption when there's something real to say ("Alt-text needs author r…8fb4d34 -
Learner-focused features: summary, self-check, glossary, inline term highlighting
ClaudeTagged pre-learner-features at the commit before this so a single `git reset --hard pre-learner-features` (or non-destructive `git revert pre-learner-features..HEAD`) takes us back to known-good if anything misbehaves. Four learner-impact features ship together because they share data plumbing — same Segment/Metadata schema additions, same editor round-trip work: #2 One-sentence summary above each section. Claude's `summary` field from topic segmentation is now rendered as an "In brief:" advance organizer above the slide image. Primes the learner before they hit the detail; evidence-based for comprehension. Editable in the review screen. #4 Auto-built glossary at the end of the guide. Collects every segment's key_terms across the whole document, dedupes case- insensitively (first-occurrence wins), sorts alphabetically, and anchors each entry back to the section where the term was first introduced. #5 Inline key-term highlighting in narration. Defined terms w…d61b118
-
WCAG 2.1 AA accessibility fixes across all templates
ClaudeContrast (1.4.3/1.4.11): - Banner secondary text: #ECBFC7 → #f5d5db (3.0:1 → 4.6:1 on #750014) - Subtle text color: #888 → #767676 (3.5:1 → 4.5:1 on #fafaf7) - Form input focus: restore outline:2px solid primary (was outline:none) - contenteditable outline: 1px dashed #D0D0D0 → 2px dashed #767676 Screen reader utilities (1.3.1/2.4.6): - Add .sr-only utility class to _doc_styles.html and index.html - Replace outdated left:-9999px sr-only h2 with proper .sr-only class Non-text content (1.1.1): - figcaption timestamp badge: aria-label → aria-hidden (was triple-announcing) - Equation figure: aria-label on wrapper → .sr-only figcaption (avoids overriding MathJax assistiveMml) - Deselected scenes: add diagonal stripe ::after so state isn't opacity-only Semantics / relationships (1.3.1): - Narration div: add aria-labelledby linking to label span (guide + review) - Key terms editor: add role="group" + aria-labelledby - Math equations editor: add role="group" + aria-labelledby - Key term i…b12bb48
-
Reorder segment layout: image, OCR, audio, narration
ClaudeThe on-screen-text panel now sits directly under the slide image (where a reader can immediately compare what they see), the audio clip plays right after, and the narration paragraphs come last. Previously the narration block came first with audio nested inside it and OCR was at the bottom. Both the read-only guide template and the editor share the new order; CSS targets .narration__audio by class so no style changes were needed.4f17788 -
Remove TL;DR view toggle from guide / review templates
ClaudeThe Full / TL;DR mode switch wasn't earning its complexity — TL;DR was the only alternate, and reviewers tended to either keep the full guide or skim it manually. Removing the toggle, its CSS, the mode-switch script, and the review-time injection that re-added them to downloaded guides. Net 127 lines deleted; no behavior change for the default Full view.0303a74 -
Accessibility audit fixes: gating drafts, removing role conflicts, etc.
ClaudeFollowing an audit pass, working through the remaining findings: B3 (alt-warning ships unconditionally on guide.html, advertising WCAG 1.1.1 non-conformance even when alt-text has been authored) → Segment now carries alt_text_reviewed: bool. Orchestrator flips it to True when LLM extraction supplies real alt text. Template gates the warning banner on any-segment-still-draft, gates the per-image data-alt-draft attribute on the segment's flag, and drops the '(needs human review)' figcaption suffix once it's no longer true. SegmentMetadata round-trips the field through save/load JSON so review-edited guides stay marked. B4 (draft alt text contained the meta-instruction 'Review and rewrite to convey purpose, not raw text' — screen readers read it aloud) → _draft_alt_from_ocr emits clean text only ('Slide text: …' / 'Lecture visual (alt text pending author review)'). The draft state is signalled ex…bfb97c5 -
Accessibility: target size, reduced motion, scroll padding, focus-after-skip
ClaudeThree pre-audit improvements I'm already confident about: - WCAG 2.5.8 (Target Size Minimum, Level AA): the View Full / TL;DR toggle buttons rendered at ~22px tall — under the 24px floor. Bumped to min-height 28px / min-width 44px with a hair more padding. - WCAG 2.3.3 (Animation from Interactions, Level AAA) and friends: added a global @media (prefers-reduced-motion: reduce) rule that collapses transition/animation durations to ~0 and disables smooth scrolling. Existing transitions are subtle (collapse markers, link underlines) but should still respect the OS pref. - WCAG 2.4.11 (Focus Not Obscured Minimum, Level AA): the sticky view-toggle bar can land focus targets underneath it when activating the skip link or a TOC anchor. Added scroll-padding-top: 3.25rem on <html> so the browser scrolls anchor targets clear of the sticky. - Skip-link target: <main id="main-content"> now has tabindex="-1" so focus consistently moves into the main region after the skip cl…583f6ac
-
Consolidate zip assets under static/
ClaudePreviously the zip put images in static/ but audio in a separate audio/ folder. Now everything lives in one static/ directory: scene_*.jpg frames and segment_*.mp3 clips share the namespace (different filename prefixes prevent collisions) and the bundle has a clean two-entry layout: study-guide.html static/ scene_0000.jpg scene_0001.jpg segment_0000.mp3 segment_0001.mp3 Changes: - bundle_zip writes audio_paths under static_dir_name (was audio_dir_name). - guide.html template emits {{image_dir}}/<filename> for both image and audio src, so a renamed image_dir flows through to audio too. - Orchestrator slices audio into inputs.frames_dir directly instead of a sibling audio/ dir, so freshly-built export-metadata bundles have audio in the same place metadata_to_segment expects. - main.py's worker reads audio bytes from result.audio_paths directly, no longer guessing the on-disk layout. - metadata_to_segment looks in frames_…f2b292d -
Per-segment narration audio (Feature 5)
Claudeffmpeg slices each kept segment's [start, end) window from the source video into a 32 kbps mono MP3 (~500 KB per 2-min segment). Below 1.5s segments are skipped — too short to be useful. Failures are non-fatal: a segment without audio just doesn't render an <audio> element. ffmpeg-not-on-PATH skips the whole stage gracefully. Plumbing: app/pipeline/audio.py — slice_segment / slice_all helpers (subprocess ffmpeg, libmp3lame, 22 kHz mono, bounded timeout, stderr captured for warnings). PipelineInputs.extract_audio (default True) gates the stage. PipelineResult.audio_paths carries Path|None per segment. Segment.audio_filename / audio_data_uri reach the templates. Render paths: - zip: audio/ folder added to the bundle; templates use 'audio/{fn}'. - single: audio_data_uri inlined as base64 alongside images. - review: lazy-fetched via /audio/{job_id}/{filename} (mirrors the alts pattern). Editor download/previ…364bfae -
TL;DR view toggle in the published guide (Feature 6)
ClaudeAdds a Full/TL;DR toggle bar (sticky at the top of the rendered guide) that flips body[data-view='tldr']; CSS hides figures, narration, OCR details, timestamps, and the alt-warning in TL;DR mode while keeping the section heading + key terms + equations. Choice persists via localStorage so a learner who picks TL;DR keeps it across reloads. Both render paths get it: - Direct guide.html (CLI render-from-metadata, /single download) embeds the markup + script in the template. - Editor's buildFinalHTML strips all <script> tags during build, so the downloaded HTML re-injects the toggle bar after the skip link plus a minified IIFE script that wires it up.1896eac -
Format on-screen OCR text into paragraphs, lists, and inline LaTeX
ClaudeRaw Tesseract output rendered as a single string lost all structure. The new text_format module splits OCR text into blocks and emits proper HTML: - blank-line-separated blocks become <p> - bullet/ordered prefixes become <ul>/<ol> - lines that look like equations (short, contain =, Greek, math symbols, sub/superscripts, few alphabetic words) are normalized to LaTeX and wrapped in MathJax \(...\) MathJax is auto-loaded when any segment's OCR has detected math, so no template changes are needed beyond the new format_ocr Jinja filter. Equation detection is intentionally conservative — misfires render as plain paragraphs and reviewers can fix in the editor.2f21b14 -
Phase C: MathJax equations, key terms, and subtitle/module
Claudeguide.html now renders seg.key_terms as <dl class="key-term"> and seg.math_equations as <figure class="equation" role="math"> with MathJax delimiters. The MathJax 3 CDN loader and tex-mml-chtml config are injected automatically when any segment has at least one equation. Header gains optional subtitle and module slots (module replaces eyebrow when supplied). review.html grows two per-segment list editors: - Key terms: term + definition rows with add/remove buttons - Math equations: LaTeX textarea, aria_label, label, caption, inline flag, and a live MathJax preview that retypesets on each keystroke Save edits (JSON) now stamps schema_version: 2 and emits key_terms + math_equations + subtitle + module fields. Load edits handles both v2 saves and v1 (legacy) saves via the migrate_v1_to_v2 path. Download final HTML reads the editor state, builds proper <dl>/<figure> elements in the cloned DOM, and injects the MathJax loader when any included segment has an equation. Verified: 33 pytes…6f7a34c -
Format narration into paragraphs
Claudealign_segments now groups cues into readable paragraphs, breaking on (a) cue gaps >= 1.5s when the prior cue ended a sentence, (b) speaker labels like "PROFESSOR:" introducing a new cue, or (c) accumulated length >= 450 chars at a sentence boundary. Segment.narration is now a list[str], rendered as one <p> per paragraph. In review mode, the narration body is a contenteditable container with <p> children, so pressing Enter creates new paragraphs naturally. Save/load JSON preserves the array structure, and the downloaded final HTML keeps the paragraph breaks. On the test video, the previously single-paragraph 7-minute final segment now reads as 10 paragraphs. https://claude.ai/code/session_01G3XpEehfr9DnX9L7BahQ4Lf697ee6 -
Restyle guide/review templates after photosynthesis prototype
ClaudeRebuild guide.html and review.html on the visual structure of maryjoanz/video_to_studyguide/prototype_study_guide.html: doc-header banner with eyebrow + meta line, bordered TOC card with CSS-counter numbering, sections with section__heading auto-numbering, .figure cards with mono timestamp badges, .onscreen-text callout for OCR, narration label, and a quiet doc-footer. Shared CSS lives in _doc_styles.html so the editor view and final guide stay visually consistent. render_guide / render_review now accept eyebrow and meta_lines (defaults computed from segment count + total duration). The editor's selectors were updated for the section.section structure and verified end-to-end via the JSDOM harness; the downloaded final HTML retains every prototype-style class and the #750014 banner. https://claude.ai/code/session_01G3XpEehfr9DnX9L7BahQ4Ld9ecc7c -
Build initial VideoGuideMaker MVP
ClaudeFastAPI web app that turns an instructional video plus VTT/SRT transcript into a WCAG 2.2 AA-ready HTML study guide. Pipeline: PySceneDetect + OpenCV for scene detection and frame sampling, Haar-cascade face detection to drop talking-head frames, Tesseract OCR for on-screen text, timestamp-based narration alignment, Jinja2 template with proper landmarks, headings, lang, skip link, time elements, and data-alt-draft="true" flags on auto-drafted alt-text. Output is either a self-contained HTML file (base64-inlined images) or a zip bundle (HTML + images/ folder). Includes unit tests for the transcript parser and HTML generator. https://claude.ai/code/session_01Q9yxSTNAMqkjcYLDJAbV3Zb6f361a