|
| 1 | +# feed-finder Application |
| 2 | + |
| 3 | +## Runner |
| 4 | + |
| 5 | +```sh |
| 6 | +cd ~/hyperdata/transmissions # adjust to your local path |
| 7 | +./trans feed-finder |
| 8 | +``` |
| 9 | + |
| 10 | +## Description |
| 11 | + |
| 12 | +Discovers RSS and Atom feeds from web pages previously cataloged by the link-finder application. |
| 13 | + |
| 14 | +**Pipeline Flow:** |
| 15 | +1. Queries SPARQL store for HTML bookmarks with status 200 (from link-finder) |
| 16 | +2. Fetches HTML content for each page |
| 17 | +3. Extracts feed URLs from `<link rel="alternate">` tags |
| 18 | +4. Accumulates discovered feed URLs |
| 19 | +5. Saves list to `data/feeds.md` |
| 20 | + |
| 21 | +**Feed Types Detected:** |
| 22 | +- RSS 2.0 (`application/rss+xml`) |
| 23 | +- RSS 1.0 (`application/rdf+xml`) |
| 24 | +- Atom (`application/atom+xml`) |
| 25 | +- JSON Feed (`application/feed+json`) |
| 26 | + |
| 27 | +## Prerequisites |
| 28 | + |
| 29 | +1. **SPARQL Store**: Running Fuseki instance at `http://localhost:3030/test` |
| 30 | +2. **Existing Data**: Bookmarks must exist in `<http://hyperdata.it/content>` graph (created by link-finder) |
| 31 | +3. **Network Access**: HTTP access to fetch pages |
| 32 | + |
| 33 | +## Configuration |
| 34 | + |
| 35 | +### SPARQL Query |
| 36 | +Queries `<http://hyperdata.it/content>` graph for: |
| 37 | +- Bookmarks with `bm:status "200"` |
| 38 | +- Content type containing `text/html` |
| 39 | + |
| 40 | +### HTTP Settings |
| 41 | +- Timeout: 10 seconds (prevents hanging on slow sites) |
| 42 | +- Skips pages with errors or timeouts |
| 43 | + |
| 44 | +### Output |
| 45 | +- File: `src/apps/feed-finder/data/feeds.md` |
| 46 | +- Format: One feed URL per line |
| 47 | + |
| 48 | +## Performance |
| 49 | + |
| 50 | +- Processing time depends on number of HTML bookmarks in store |
| 51 | +- HTTP timeout of 10 seconds per page |
| 52 | +- For large datasets, expect ~30-60 minutes per 1000 pages |
| 53 | + |
| 54 | +## Verification |
| 55 | + |
| 56 | +Check discovered feeds: |
| 57 | + |
| 58 | +```sh |
| 59 | +cat src/apps/feed-finder/data/feeds.md |
| 60 | +``` |
| 61 | + |
| 62 | +Count feeds found: |
| 63 | + |
| 64 | +```sh |
| 65 | +wc -l src/apps/feed-finder/data/feeds.md |
| 66 | +``` |
| 67 | + |
| 68 | +## Example Output |
| 69 | + |
| 70 | +``` |
| 71 | +https://example.com/feed |
| 72 | +https://blog.example.org/rss.xml |
| 73 | +https://news.example.net/atom.xml |
| 74 | +``` |
| 75 | + |
| 76 | +## Troubleshooting |
| 77 | + |
| 78 | +**No feeds found:** |
| 79 | +- Verify link-finder has populated the SPARQL store |
| 80 | +- Check that pages have status 200 and HTML content type |
| 81 | +- Run with `-v` flag for verbose logging |
| 82 | + |
| 83 | +**HTTP timeouts:** |
| 84 | +- Increase timeout in config.ttl: `:httpSettings :timeout "20000"` |
| 85 | +- Check network connectivity |
| 86 | + |
| 87 | +**SPARQL connection errors:** |
| 88 | +- Verify Fuseki is running: `http://localhost:3030/test` |
| 89 | +- Check endpoints.json configuration |
| 90 | + |
| 91 | +## Related Apps |
| 92 | + |
| 93 | +- **link-finder**: Discovers links from markdown files, stores in SPARQL |
| 94 | +- **newsmonitor**: Subscribes to feeds and monitors content |
| 95 | + |
| 96 | +## Next Steps |
| 97 | + |
| 98 | +After finding feeds: |
| 99 | +1. Review `data/feeds.md` for relevant feeds |
| 100 | +2. Use newsmonitor/subscribe to add feeds to monitoring |
| 101 | +3. Fetch and process feed content with newsmonitor/fetch-with-storage |
0 commit comments