Add FreshRSS ingestion and rule filtering
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Content Extract MCP
|
||||
# Content Extract MCP
|
||||
|
||||
Python MCP scaffold for article content extraction.
|
||||
Python MCP scaffold for article content extraction, structured summary validation, and deterministic filtering.
|
||||
|
||||
## Run
|
||||
|
||||
@@ -9,10 +9,11 @@ pip install -e .
|
||||
summary-mcp
|
||||
```
|
||||
|
||||
The server exposes two tools:
|
||||
The server exposes three tools:
|
||||
|
||||
- `extract_url_content`
|
||||
- `extract_item_content`
|
||||
- `filter_summary_result`
|
||||
|
||||
Validate an LLM summary result:
|
||||
|
||||
@@ -28,3 +29,51 @@ python scripts/run_summary_loop.py ^
|
||||
--prompt outputs/llm-summary-prompt.txt ^
|
||||
--output outputs/result.json
|
||||
```
|
||||
|
||||
Pull FreshRSS entries and map them into normalized `item` objects:
|
||||
|
||||
```bash
|
||||
set FRESHRSS_API_BASE_URL=http://127.0.0.1:8081/api/greader.php
|
||||
set FRESHRSS_USERNAME=bot
|
||||
set FRESHRSS_API_PASSWORD=your-api-password
|
||||
python scripts/pull_freshrss_items.py --limit 5
|
||||
```
|
||||
|
||||
The script writes:
|
||||
|
||||
- `outputs/freshrss.raw.json`
|
||||
- `outputs/freshrss.items.json`
|
||||
|
||||
Pull FreshRSS entries and run content extraction for each mapped item:
|
||||
|
||||
```bash
|
||||
set FRESHRSS_API_BASE_URL=http://127.0.0.1:8081/api/greader.php
|
||||
set FRESHRSS_USERNAME=osiman
|
||||
set FRESHRSS_API_PASSWORD=your-api-password
|
||||
python scripts/run_freshrss_extract.py --limit 1
|
||||
```
|
||||
|
||||
The script writes:
|
||||
|
||||
- `outputs/freshrss.raw.json`
|
||||
- `outputs/freshrss.items.json`
|
||||
- `outputs/freshrss.extracted.json`
|
||||
|
||||
Run deterministic filter rules against a structured summary result:
|
||||
|
||||
```bash
|
||||
python scripts/run_filter_rules.py ^
|
||||
--summary outputs/result.json ^
|
||||
--extracted outputs/read-flow-2026.extracted.json ^
|
||||
--output outputs/filter-decision.json
|
||||
```
|
||||
|
||||
You can optionally pass a context file to inject interest topics or source tags:
|
||||
|
||||
```bash
|
||||
python scripts/run_filter_rules.py ^
|
||||
--summary outputs/result.json ^
|
||||
--extracted outputs/read-flow-2026.extracted.json ^
|
||||
--context outputs/filter-context.json ^
|
||||
--output outputs/filter-decision.with-context.json
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user