Jason CS Lin

Synanews

演算本日關鍵產業新聞的拓樸。

Repository Target

This project is configured as Synanews and pushes generated artifacts to the GitHub Pages repository for user lcslin.

What This Project Does

gen-daily-graph.py fetches headlines from https://www.itis.org.tw/member/DailyNews.aspx, sends a numbered title list to an LLM, writes the returned graph to a dated JSON file, and embeds that day’s data into daily-graph.html.

The current implementation is headline-driven. It does not scrape article summaries or full article content.

Inputs

Environment variables are loaded from .env with python-dotenv.

Required:

Optional:

Recommended secret file location for cron:

Outputs

Running the generator produces:

The JSON normally includes:

CLI

python gen-daily-graph.py
python gen-daily-graph.py --today
python gen-daily-graph.py --date 20260206

Behavior:

-o/--output is not supported by the current implementation.

Implementation Notes

Scraping

LLM Input

Post-processing

Supporting Scripts

cron-entry.sh

commit.sh

Cronjob Auth

For local cronjob execution, the preferred setup is to keep secrets outside the repo and let the scripts load them from a fixed path.

Recommended ~/.config/synanews.env content:

TAITRA_API_KEY=...
TAITRA_BASE_URL=https://runway.taitra.ai
GITHUB_TOKEN=...

Recommended crontab entry:

0 8 * * * /Users/cslin/app-dev/Synanews/cron-entry.sh >> /Users/cslin/app-dev/Synanews/cron.log 2>&1

commit.sh still supports gh auth token as a fallback, but a fixed env file is more predictable for cron.

Known Gaps