How garaupere/cocopress works
CoCoPress compiles date-bounded news articles into per-publication corpus files, with optional Stanza lemmatization and POS tagging. The primary documented workflow is the local desktop app: select publications and dates, choose an output directory, run the compiler, and inspect the resulting corpus. The sampled desktop code shows Electron dispatching work to a Python worker, which delegates compilation to app.py and writes its archive contents locally. README-described discovery and output stages are included; their internal links are documented rather than inferred from unsampled code. The repository also contains a web download interface, but its backend routes were not sampled.
Main entry points: app.py Corpus compiler · desktop_worker.py Python worker · renderer.js Desktop UI · electron-main.js Electron main
Components 19
Desktop interface
- Desktop UI
renderer/renderer.js - Electron main
electron-main.js - Python worker
desktop_worker.py
Corpus compilation
- Corpus compiler
app.py - Publication catalog
app.py - Date selection
app.py - Stanza tagging
app.py
Article discovery
- Discovery strategy
README.md - RSS discovery
app.py - Sitemap discovery
app.py - Controlled crawling
app.py - Article extraction
app.py
Corpus outputs
- Corpus archive
app.py - Local corpus writer
desktop_worker.py - Corpus files
README.md
Web interface
- Web download UI
static/app.js - Web API
app.py
Other components
- Researcher
- News websites
Connections 20
- Researcher → Desktop UI: selects options
README.md - Desktop UI → Electron main: starts corpus
renderer/renderer.js - Electron main → Python worker: spawns worker
electron-main.js - Python worker → Corpus compiler: delegates to
desktop_worker.py - Python worker → Publication catalog: requests catalog
desktop_worker.py - Python worker → Corpus compiler: validates dates
desktop_worker.py - Corpus compiler → RSS discovery: tries first
README.md - Corpus compiler → Sitemap discovery: tries next
README.md - Corpus compiler → Controlled crawling: falls back to
README.md - News websites → RSS discovery: provides feeds
README.md - News websites → Sitemap discovery: provides sitemaps
README.md - News websites → Controlled crawling: serves pages
README.md - Corpus compiler → Article extraction: extracts articles
app.py - Corpus compiler → Stanza tagging: optionally tags
README.md - Corpus compiler → Corpus archive: builds archive
app.py - Python worker → Local corpus writer: writes archive
desktop_worker.py - Local corpus writer → Corpus files: creates files
README.md - Researcher → Web download UI: submits request
static/app.js - Web download UI → Web API: calls API
static/app.js - Web API → News websites: fetches articles