From 00356d0ed22226fb9c97911b8e83cc96f2690523 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Tue, 21 Jul 2015 09:26:42 -0400 Subject: [PATCH] contrib/rss_downloader: move tag link to Config MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/rss_downloader/src/rss_downloader.nit | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/rss_downloader/src/rss_downloader.nit b/contrib/rss_downloader/src/rss_downloader.nit index 66cd969..3551686 100644 --- a/contrib/rss_downloader/src/rss_downloader.nit +++ b/contrib/rss_downloader/src/rss_downloader.nit @@ -52,6 +52,9 @@ class Config # XML tag used for pattern recognition fun tag_title: String do return "title" + # XML tag of the link to act upon + fun tag_link: String do return "link" + # Action to apply on each selected RSS element fun act_on(element: Element) do @@ -265,7 +268,7 @@ redef class Text var elements = new Array[Element] for item in items do var title = item[tool_config.tag_title].first.as(XMLStartTag).data - var link = item["link"].first.as(XMLStartTag).data + var link = item[tool_config.tag_link].first.as(XMLStartTag).data elements.add new Element(title, link) end -- 1.7.9.5