Flashcards CapECL
To run the site locally after cloning:
- Install Node.js 20+.
- Install dependencies:
npm ci
If you plan to regenerate flashcards locally, install Python 3.11+ and the script dependencies:
pip install pymupdf pillow numpy
npm run devstarts the Vite dev server with HMR (default: http://localhost:3000).npm run buildoutputs the production build todist/.npm run previewserves the built output locally for a production-like check.
Quick path (just push the PDF, GitHub Actions regenerates + deploys):
- Drop the updated PDF into
flashcards/. - Commit and push to
main.
Recommended path (verify locally before pushing):
- Drop the updated PDF into
flashcards/. - Run the generator from the repo root and pick the PDF:
python cartes.py
- Review the generated assets in
flashcards/<pdf-name>/(images +manifest.json) and commit. - Run
npm run buildthennpm run previewto verify the site locally. - Push to
main.
npm run lintruns ESLint onsrc/.npm run formatandnpm run format:checkrun Prettier onsrc/.
- Only the
dist/folder is deployed to production. .htaccesslives inpublic/, so Vite copies it intodist/during the build (important).- GitHub Actions includes a Deploy Dist workflow that builds on push to
mainand publishesdist/to thedeploybranch. - Hosting is linked to the
deploybranch via webhook, so updates go live automatically.
This repository contains two distinct parts under different licenses:
-
Code (everything except
flashcards/):
Licensed under the MIT License.
-
Flashcards (the contents of the
flashcards/directory):
Licensed under the GNU Free Documentation License v1.3.
Users and contributors must respect both licenses.
In particular, any redistribution or modification of the flashcards must comply with the terms of the GNU Free Documentation License.