summaryrefslogtreecommitdiffstats
path: root/appinfo/application.php
diff options
context:
space:
mode:
Diffstat (limited to 'appinfo/application.php')
-rw-r--r--appinfo/application.php37
1 files changed, 0 insertions, 37 deletions
diff --git a/appinfo/application.php b/appinfo/application.php
index 616526405..b90314f02 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -31,10 +31,6 @@ use OCA\News\Db\MapperFactory;
use OCA\News\Fetcher\Fetcher;
use OCA\News\Fetcher\FeedFetcher;
-use OCA\News\ArticleEnhancer\Enhancer;
-use OCA\News\ArticleEnhancer\XPathArticleEnhancer;
-use OCA\News\ArticleEnhancer\RegexArticleEnhancer;
-
use OCA\News\Explore\RecommendedSites;
@@ -132,39 +128,6 @@ class Application extends App {
return new HTMLPurifier($config);
});
- $container->registerService(\OCA\News\ArticleEnhancer\Enhancer::class,
- function($c) {
- $enhancer = new Enhancer();
-
- // register simple enhancers from config json file
- $xpathEnhancerConfig = file_get_contents(
- __DIR__ . '/../articleenhancer/xpathenhancers.json'
- );
-
- $xpathEnhancerConfig = json_decode($xpathEnhancerConfig, true);
- foreach($xpathEnhancerConfig as $feed => $config) {
- $articleEnhancer = new XPathArticleEnhancer(
- $c->query(\OCA\News\Utility\PicoFeedClientFactory::class),
- $config
- );
- $enhancer->registerEnhancer($feed, $articleEnhancer);
- }
-
- $regexEnhancerConfig = file_get_contents(
- __DIR__ . '/../articleenhancer/regexenhancers.json'
- );
- $regexEnhancerConfig = json_decode($regexEnhancerConfig, true);
- foreach($regexEnhancerConfig as $feed => $config) {
- foreach ($config as $matchArticleUrl => $regex) {
- $articleEnhancer =
- new RegexArticleEnhancer($matchArticleUrl, $regex);
- $enhancer->registerEnhancer($feed, $articleEnhancer);
- }
- }
-
- return $enhancer;
- });
-
/**
* Fetchers
*/