news-radar

所属分类:雷达系统
开发工具:TypeScript
文件大小:0KB
下载次数:0
上传日期:2023-07-31 15:47:02
上 传 者sh-1993
说明:  新闻雷达,,
(news-radar,,)

文件列表:
Dockerfile (301, 2023-09-06)
LICENSE (1073, 2023-09-06)
Makefile (2039, 2023-09-06)
__tests__/ (0, 2023-09-06)
__tests__/main.test.ts (73, 2023-09-06)
_site/ (0, 2023-09-06)
_site/archives/ (0, 2023-09-06)
_site/archives/1/ (0, 2023-09-06)
_site/archives/1/index.html (8764, 2023-09-06)
_site/archives/10/ (0, 2023-09-06)
_site/archives/10/index.html (8733, 2023-09-06)
_site/archives/11/ (0, 2023-09-06)
_site/archives/11/index.html (8769, 2023-09-06)
_site/archives/12/ (0, 2023-09-06)
_site/archives/12/index.html (8929, 2023-09-06)
_site/archives/13/ (0, 2023-09-06)
_site/archives/13/index.html (8989, 2023-09-06)
_site/archives/14/ (0, 2023-09-06)
_site/archives/14/index.html (8644, 2023-09-06)
_site/archives/15/ (0, 2023-09-06)
_site/archives/15/index.html (8921, 2023-09-06)
_site/archives/16/ (0, 2023-09-06)
_site/archives/16/index.html (8733, 2023-09-06)
_site/archives/17/ (0, 2023-09-06)
_site/archives/17/index.html (9112, 2023-09-06)
_site/archives/18/ (0, 2023-09-06)
_site/archives/18/index.html (8815, 2023-09-06)
_site/archives/19/ (0, 2023-09-06)
_site/archives/19/index.html (8952, 2023-09-06)
_site/archives/2/ (0, 2023-09-06)
_site/archives/2/index.html (8771, 2023-09-06)
_site/archives/20/ (0, 2023-09-06)
_site/archives/20/index.html (8987, 2023-09-06)
_site/archives/21/ (0, 2023-09-06)
_site/archives/21/index.html (8597, 2023-09-06)
_site/archives/22/ (0, 2023-09-06)
_site/archives/22/index.html (9013, 2023-09-06)
_site/archives/23/ (0, 2023-09-06)
... ...

# News Radar This is an experiment on using AI to generate news articles. The system collects programming news from multiple sources, selects the relevant items and summarizes them. You can add your own sources and adjust the prompts to make it write accordingly to your own editorial policy and biases. You need to create a `.env` file with your OpenAI key, in this format ``` OPENAI_API_KEY=sk-... ``` ### How it works: The system performs the following steps: 1 - Scanner\ Collects top items from the source URLs. Results are stored in a database and each item is marked as "pending". 2 - [Revalance filter](https://github.com/lfarroco/news-radar/blob/main/src/candidates.ts)\ Picks "pending" items and asks the AI to identify what are the most relevant ones according to the target audience. Items are marked as "approved". 3 - Scrapper\ Articles marked as "approved" are scraped. The resulting content is stored in the database. 4 - [Writer](https://github.com/lfarroco/news-radar/blob/main/src/writer.ts)\ Asks the AI write a summary about the scraped article. 5 - Publisher\ Processed items are published to a static website using Lume. ### Workflow: The possible status transitions for each article: scan -> create articles with status=pending candidates -> submit status=pending articles to relevance check approved ? either yes -> (status=approved) or no -> (status=rejected) with approved: -> try scraping scraped ? either yes -> (status=scraped) or no -> (status=error-scraping) with each scraped: -> write -> (status=published) ### Running Running `make run` will scan the sources and write the news into the database. Running `make build-pages` will use the updated db to generate the static website under `_site` Running `make serve` will build the static website and serve it at port `3000`. Running `sh cron.sh` will scan and write website files. It runs every hour.

近期下载者

相关文件


收藏者