simonlin1212/investment-news
为 A股投资者打造的全球产业链资讯看板 · 12 大赛道一一对应 A股板块(半导体/AI/机器人/新能源车…),覆盖 100+ 权威源,用你自己的大模型每日提炼中文「今日要点」+ 翻译 · 本地运行、零 API key · Local AI news dashboard tracking the global industry signals behind China A-share sectors
Investment News – A‑share industry‑signal dashboard
What it is – A locally‑run Python tool that fetches ≈ 100 public news/RSS sources, runs a large‑language model (your own Claude subscription or any OpenAI‑compatible API) to extract 3‑5 Chinese “today’s‑key‑points” per sector, translates the original English headlines, and displays everything on a single browser page (http://localhost:8793).
Why it matters – It combines three pieces of technology that are often separate:
- Web‑scraping of many international media outlets (pure standard‑library code, no third‑party packages).
- LLM‑powered summarisation & translation performed locally, so no data leaves your machine.
- A sector‑focused UI that maps global industry news to the 12 A‑share sectors most relevant to Chinese investors.
Core capabilities (as listed in the README)
| Feature | What you get |
|---|---|
| 今日要点 (Daily key points) | 3‑5 concise Chinese bullet points per sector, deduplicated across sources, generated by the LLM. |
| 双语呈现 (Bilingual view) | English headline shown alongside its Chinese translation; original article link is attached. |
| 12 sector coverage | AI/large‑model, semiconductor, robotics, EV, energy, biotech, aerospace, cybersecurity, internet/tech, consumer electronics, macro‑economics, science. |
| 一键刷新 | Click the refresh icon in the dashboard; the server runs a fetch‑then‑digest pipeline and reloads the page automatically. |
| 双模型选项 | Use a local claude-cli subscription (free after login) or any OpenAI‑compatible API (DeepSeek, OpenAI, OpenRouter, etc.). |
| 本地运行 & 零依赖 | All fetching, processing, and serving are done with Python’s standard library; no database, no external hosting. |
| 合规过滤 | Built‑in keyword blacklist removes gambling, crypto‑trading, porn, etc.; political and financial news are kept. |
Quick start (from the README)
# clone & enter repo
git clone https://github.com/simonlin1212/investment-news.git
cd investment-news
# configure LLM (optional – defaults to local Claude subscription)
# edit llm.config.json if you prefer an OpenAI‑compatible API
# start the local server (default port 8793)
python3 server.py
# open the dashboard
# macOS: open http://localhost:8793
# Windows: start http://localhost:8793
# Linux: xdg-open http://localhost:8793
Click the circular refresh button in the top‑left corner to trigger a new fetch‑and‑summarise run.
How it works (pipeline diagram from the README)
- sources.json – Lists 108 RSS/JSON endpoints, each tagged with a sector (
hint). - scripts/fetch.py – Downloads the feeds, keeps only items from the last N days, applies the compliance keyword filter, normalises timestamps to Beijing time, and writes raw entries to
data.js. - scripts/digest.py – Calls the configured LLM (via
scripts/llm.py) to:- Summarise each sector’s recent items into 3‑5 Chinese bullet points.
- Translate the original English titles.
- Attach the source URL to each bullet.
The enriched data overwrites
data.js.
- index.html – A single‑file static dashboard that reads
data.jsin the browser and renders the sector panels, bilingual lists, and refresh button. - server.py – A tiny
http.server‑based web server that servesindex.htmland exposes/api/refreshwhich runs the fetch + digest steps in a subprocess.
Configuration details
| File | Purpose |
|---|---|
llm.config.json |
Choose the LLM provider. { "provider": "claude-cli" } uses a locally‑installed Claude subscription (requires claude login). Or use { "provider": "api", "api": { "base_url": "…", "api_key": "…", "model": "…" } } for any OpenAI‑compatible endpoint. |
sources.json |
Editable list of news sources. Adding a source is as simple as appending a JSON object with name, hint (sector tag), type (rss), and url. |
| Environment variables (optional) | HTTPS_PROXY/HTTP_PROXY for proxying, FETCH_TIMEOUT to increase per‑source timeout, PYTHONIOENCODING if needed. |
Who it’s for
- Individual investors in China’s A‑share market who need a quick, Chinese‑language snapshot of global industry trends.
- Users who prefer privacy‑first tooling – all data stays on the local machine, no cloud storage.
- Anyone with a Claude subscription or an OpenAI‑compatible API key who wants a zero‑dependency news‑summariser.
Limitations & disclaimer (as stated)
- The dashboard shows industry signals, not real‑time price or quantitative market data.
- It is not investment advice; decisions based on the output are the user’s responsibility.
- The tool respects source terms of service by low‑frequency RSS fetching; heavy use may require additional permission.
License
MIT – free to use, modify, and redistribute.
Bottom line: Investment News is a lightweight, privacy‑preserving Python application that leverages a local or API‑based LLM to turn dozens of international tech‑business feeds into a concise, bilingual daily briefing for Chinese stock‑market investors.
Related
- Project
- Project
- Project
- Project
- Project