Extract high-resolution slides from protected university lecture viewers and save them as compressed, study-ready PDFs.
LibreLec works as a Chrome Extension paired with a Terminal UI (TUI). The extension reads canvas pixels directly from the browser — no external automation, no headless browsers, no extra downloads. Just your own Chrome and a single npm command.
- Canvas Capture: Reads rendered pixels straight from the viewer's
<canvas>elements — bypasses disabled download buttons entirely. - High Resolution: Captures slides at native browser resolution for crisp text.
- Smart Compression: Each slide is optimized via Sharp (PNG → JPEG, quality 85) before assembly — 70 MB of raw slides becomes a ~2–3 MB PDF.
- Cross-Platform: Works on Linux, macOS, and Windows — anywhere Chrome and Node.js run.
- Step-by-Step TUI: Guided terminal interface with progress bars, colored output, and keyboard navigation.
Default (npm):
npm install -g librelecOptional (GitHub Packages):
npm config set @a7mddra:registry https://npm.pkg.github.com
npm install -g @a7mddra/librelec- Download
librelec-extension.zipfrom GitHub Releases. - Extract the zip file.
- Open
chrome://extensionsin your browser. - Enable "Developer mode" (toggle in the top right).
- Click "Load unpacked" and select the extracted folder. (Note: If Chrome shows any errors on the extension card, you can safely ignore them.)
- Open the protected lecture page in Chrome and log in normally.
- In your terminal, run:
librelec. - The TUI will:
- Wait for the extension to connect.
- Scan for protected slides.
- Ask you for a PDF filename.
- Extract every slide with a progress bar.
- Compress and merge them into a single PDF.
- Save to your
~/Documentsfolder.
┌──────────────────┐ WebSocket ┌────────────────┐
│ Chrome Extension │ ◄────────────────────► │ Terminal UI │
│ (canvas reader) │ ws://localhost:27631 │ (librelec CLI) │
└──────────────────┘ └────────────────┘
│ │
page-bridge.ts Sharp + pdf-lib
canvas.toDataURL() PNG→JPEG → PDF assembly
| Package | Purpose |
|---|---|
packages/ext |
Chrome Extension (MV3) — reads canvas pixels from protected viewers |
packages/tui |
Terminal UI — WS server, extraction orchestration, PDF compression |
# Install dependencies
npm install
# Build both packages
npm run build:ext
npm run build:tui
# Run TUI in dev mode
npm run dev:tui
# Typecheck
npm run tsc:ext
npm run tsc:tui# Publish current TUI version (npm + GitHub Packages)
npm run publish:tui
# Bump TUI → push commit → publish to npm + GitHub Packages
node scripts/bump.mjs tui 0.2.0
# Bump Extension → push tag → triggers GitHub Release
node scripts/bump.mjs ext 0.2.0This tool is for personal study use only. It helps you access materials you already have legitimate access to through your university login. Please respect your institution's intellectual property and acceptable use policies. Do not distribute copyrighted materials.