How nikil-crypto-spec/ai_chronicle works
This is a manually run scientific-newsletter generator. Its main workflow loads publisher/topic settings, collects recent articles, filters and deduplicates them, ranks by topic relevance, optionally fetches article text, summarizes through a selected LLM or abstract fallback, then renders and sends an HTML digest or writes a dry-run file. SQLite state prevents repeats across live runs. The graph preserves both collector types and the optional embedding and LLM paths; unsampled subsystem links are included only where the README or SOURCE INDEX supports them.
Main entry points: sender.py Email or dry-run output · factory.py LLM selection · config.py Runtime settings · models.py Raw article items
Components 23
Configuration
- Publisher sources
config/sources.yaml - Topics and prompts
config/topics.yaml - Runtime settings
newsletter/config.py
Article collection
- Collector selection
newsletter/collectors/registry.py - RSS / Atom collector
newsletter/collectors/rss.py - HTML collector
newsletter/collectors/html.py - Raw article items
newsletter/models.py
Relevance and summaries
- Seen-item state
newsletter/state.py - Cross-source dedupe
newsletter/dedupe.py - Topic ranking
newsletter/ranking.py - Full-text enrichment
newsletter/fulltext.py - LLM selection
newsletter/llm/factory.py - Local LLM adapter
newsletter/llm/local.py - Copilot adapter
newsletter/llm/copilot.py - Structured summaries
newsletter/summariser.py
Newsletter delivery
- HTML rendering
newsletter/formatter.py - Newsletter template
templates/newsletter.html.j2 - Email or dry-run output
newsletter/sender.py - Rendered HTML file
out
Other components
- Newsletter user
- Scientific publishers
- LLM services
- SMTP service
Connections 32
- Newsletter user → Publisher sources: configures sources
README.md - Newsletter user → Topics and prompts: configures interests
README.md - Publisher sources → Collector selection: selects collector
newsletter/collectors/registry.py - Collector selection → RSS / Atom collector: builds RSS
newsletter/collectors/registry.py - Collector selection → HTML collector: builds HTML
newsletter/collectors/registry.py - Scientific publishers → RSS / Atom collector: provides feeds
README.md - Scientific publishers → HTML collector: provides pages
newsletter/collectors/html.py - RSS / Atom collector → Raw article items: produces items
newsletter/collectors/rss.py - HTML collector → Raw article items: produces items
newsletter/collectors/html.py - Topics and prompts → Runtime settings: loads topics and prompts
newsletter/config.py - Newsletter user → Runtime settings: sets run options
README.md - Newsletter user → Seen-item state: controls state use
README.md - Raw article items → Seen-item state: checks seen URLs
README.md - Raw article items → Cross-source dedupe: deduplicates
README.md - Cross-source dedupe → Topic ranking: ranks candidates
run.py - Topics and prompts → Topic ranking: scores against topics
newsletter/ranking.py - Topic ranking → Full-text enrichment: selects top items
run.py - Full-text enrichment → Structured summaries: provides article text
run.py - Topic ranking → Structured summaries: provides ranked items
run.py - Runtime settings → LLM selection: configures backend
newsletter/llm/factory.py - LLM selection → Local LLM adapter: builds local adapter
newsletter/llm/factory.py - LLM selection → Copilot adapter: builds Copilot adapter
newsletter/llm/factory.py - Local LLM adapter → LLM services: calls Ollama
README.md - Copilot adapter → LLM services: calls Azure OpenAI
README.md - LLM selection → Structured summaries: supplies client
run.py - Structured summaries → HTML rendering: provides summaries
run.py - HTML rendering → Newsletter template: renders template
newsletter/formatter.py - HTML rendering → Email or dry-run output: provides subject and HTML
run.py - Runtime settings → Email or dry-run output: provides SMTP settings
run.py - Email or dry-run output → SMTP service: sends email
README.md - Email or dry-run output → Rendered HTML file: writes dry run
README.md - Email or dry-run output → Seen-item state: records sent items
run.py