netbrothers-gmbh / nb-feed
Fetch RSS- and Atom-Feeds and save to JSON
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/netbrothers-gmbh/nb-feed
Requires
- php: >=8.1
- ext-json: *
- guzzlehttp/guzzle: ^7.9
- laminas/laminas-feed: ^2.23
Requires (Dev)
README
NetBrothers NbFeed
This library pulls an RSS feed to your hard disk, transforms the items to an array and saves the results as a JSON file on your hard disk.
Installation
On the command prompt, change into your project's root directory and execute:
composer require netbrothers-gmbh/nb-feed
Configuration
NbFeed needs a readable and writeable directory. All other configurations are optional. The configuration depends on your environment. See the content of ConfigService.
| Variable | Description | Default |
|---|---|---|
| maxEntriesToSave | maximum number of feed items to be saved | 0 (all) |
| cacheMaxAge | maximum caching time of the file (in seconds) | 1800 sec |
| storagePath | absolute path to a readable and writeable directory | null |
| feedFileName | name of the file to write to/read from | nb-feed |
Example
There is an example file. To use it:
- Checkout the repository,
- run
composer install --no-dev, - run the example:
php ./example/netbrothers-feed.php.
Feel free to use the example file as a starting point for your own purposes.
Licence
MIT