The script retrieves the fulltext from the articles page and modifies the "description" field of the fever database, where fever store the article data.
The installation is very simple. Basically there are three steps to get it running:
- Clone the latest version of the script via git or download it from github (https://github.com/daniellienert/FullFever).
- Copy the file LocalConfiguration.Sample.php to LocalConfiguration.php and modify the MySQL Server credentials to your needs.
- Run the script from the console or add it to a cron task right after your call the fever cron task.
No changes on the Fever application has to be done.
The feeds are configured within the file FeedConfiguration.php. The file consists of an array with one entry per regular expression pattern matching the pages URL.
$feedConfiguration = array(
'/www.spiegel.de/' => array(
'xPath' => '//*[@id="js-article-column"]',
'keepAbstract' => TRUE,
'replace' => array()
)
);
Key | Description | Default |
---|---|---|
xPath | A XPath, defining the HTML section to retrieve | Mandatory |
keepAbstract | Keep the abstract and add the fullText or replace the abstract completely | FALSE |
replace | array with from and to value to replace regular expressions within the fulltext. First value represents search, second the replace value. | NONE |