From 53679811da855acf9bd944a389a48399ca5d5a15 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 10 Aug 2015 20:20:30 +0200 Subject: serverside full text remove enhancers add full text client side implementation fix bugs and tests for full text feed --- appinfo/application.php | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'appinfo/application.php') 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 */ -- cgit v1.2.3