How marklindstorff/langtime works
LangTime is a local reading and vocabulary-learning app. Users import text or PDF content, open a text in the browser, look up words or selected phrases, and save vocabulary statuses; the reader displays saved statuses as color-coded words. The Flask app routes these actions, persists texts, words, settings, and lookup counts in SQLite, and delegates translations to a local LibreTranslate service. The graph also includes the documented command-line import paths and statistics capability. Some template and styling details were not sampled, so their internal relationships are omitted.
Main entry points: app.py Flask routes · db.py SQLite data · main.js Reader interactions · translator.py Translation client
Components 13
Text acquisition
- Browser upload
app.py - Text CLI import
import_text.py - PDF CLI import
import_pdf.py
Web application
- Flask routes
app.py
Reading and vocabulary
- Reader
templates/reader.html - Text library
templates/index.html - Reader interactions
static/js/main.js - Vocabulary statuses
app.py - Vocabulary statistics
app.py
Persistence and translation
- SQLite data
db.py - Translation client
translator.py
Other components
- Browser user
- LibreTranslate
Connections 17
- Browser user → Flask routes: uses
README.md - Flask routes → Text library: renders
app.py - Flask routes → Reader: renders
app.py - Browser user → Browser upload: uploads
README.md - Browser upload → SQLite data: saves text
app.py - Text CLI import → SQLite data: saves text
import_text.py - PDF CLI import → SQLite data: saves text
import_pdf.py - Browser user → Reader interactions: reads and selects
README.md - Reader interactions → Flask routes: requests translation
static/js/main.js - Reader interactions → Flask routes: saves status
static/js/main.js - Flask routes → SQLite data: loads and saves
app.py - Flask routes → Translation client: requests translation
app.py - Translation client → LibreTranslate: sends text
translator.py - Flask routes → Vocabulary statuses: handles status
app.py - Flask routes → Vocabulary statistics: serves counts
app.py - Vocabulary statuses → SQLite data: reads and writes
app.py - Vocabulary statistics → SQLite data: counts statuses
app.py