How codeshreya32/ece244-book works
Khufu is an online C++ programming textbook. Its main workflow is authors maintaining MyST chapter content, which Jupyter Book turns into a book for learners. A separate semantic-search workflow extracts text from rendered chapter HTML, generates embeddings and location metadata, and saves them as JSON; the README describes copying those outputs into the built site. The excerpts do not show the semantic-search query implementation or its runtime data loading, so those links are omitted. Major chapter topics are grouped together rather than expanded into individual lessons.
Main entry points: generate.py HTML Extraction · chapters Course Chapters · outputs Search JSON Data · textbook Online Textbook
Components 11
Textbook
- Course Chapters
textbook/chapters - Online Textbook
textbook
Semantic Search
- Search Page
textbook/semantic-search.md - HTML Extraction
embeddings/generate.py - Embedding Generation
embeddings/generate.py - Search JSON Data
embeddings/outputs - Timing Decorator
embeddings/func_time.py - Result Highlighting
textbook/_static/highlight_scroll.js
Code Examples
- C++ Examples
textbook/code
Other components
- Authors
- Learners
Connections 9
- Authors → Course Chapters: write content
README.md - Course Chapters → Online Textbook: build book
README.md - Learners → Online Textbook: read
README.md - HTML Extraction → Embedding Generation: provide text
embeddings/generate.py - Embedding Generation → Search JSON Data: save embeddings
embeddings/generate.py - HTML Extraction → Search JSON Data: save locations
embeddings/generate.py - HTML Extraction → Timing Decorator: uses decorator
embeddings/generate.py - Course Chapters → HTML Extraction: render before indexing
README.md - Search JSON Data → Online Textbook: copy search outputs
README.md