Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

make search result also avail. as atom feed via /yacysearch.atom - fix logo in rss feed

regerba5a59a28ddc
diff --git a/htroot/opensearchdescription.xml b/htroot/opensearchdescription.xml
index 3d513564b..4d8a61c17 100644
--- a/htroot/opensearchdescription.xml
+++ b/htroot/opensearchdescription.xml
@@ -15,6 +15,7 @@
#(compareyacy)#
<Url type="text/html" method="GET" template="http://#[thisaddress]#/yacysearch.html?query={searchTerms}&amp;startRecord={startIndex?}&amp;maximumRecords={count?}&amp;nav=all&amp;resource=global" />
<Url type="application/rss+xml" method="GET" template="http://#[thisaddress]#/yacysearch.rss?nav=&amp;query={searchTerms}&amp;startRecord={startIndex?}&amp;maximumRecords={count?}&amp;nav=all&amp;resource=global" />
+ <Url type="application/atom+xml" method="GET" template="http://#[thisaddress]#/yacysearch.atom?query={searchTerms}&amp;startRecord={startIndex?}&amp;maximumRecords={count?}&amp;resource=global" />
::
<Url type="text/html" method="GET" template="http://#[thisaddress]#/compare_yacy.html?query={searchTerms}&amp;left=#[search_left]#&amp;right=#[search_right]#&amp;display=2" />
#(/compareyacy)#
diff --git a/htroot/yacysearch.atom b/htroot/yacysearch.atom
new file mode 100644
index 000000000..d7db11ad4
--- /dev/null
+++ b/htroot/yacysearch.atom
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom"
+ xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+>
+ <!-- YaCy Search Engine; http://yacy.net -->
+
+ <title>#[promoteSearchPageGreeting]#: #[rss_query]#</title>
+ <description>Search for #[rss_query]#</description>
+ <link>#[searchBaseURL]#?query=#[rss_queryenc]#&amp;resource=#[resource]#&amp;contentdom=#[contentdom]#&amp;verify=#[search.verify]#</link>
+ <logo>#[rssYacyImageURL]#</logo>
+ <opensearch:startIndex>#[num-results_offset]#</opensearch:startIndex>
+ <opensearch:itemsPerPage>#[num-results_itemsPerPage]#</opensearch:itemsPerPage>
+ <link rel="search" href="http://#[thisaddress]#/opensearchdescription.xml" type="application/opensearchdescription+xml"/>
+ <opensearch:Query role="request" searchTerms="#[rss_queryenc]#" />
+
+#{results}#
+<!--#include virtual="yacysearchitem.atom?item=#[item]#&eventID=#[eventID]#" -->
+#{/results}#
+
+</feed>
\ No newline at end of file
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index da8b295d3..e3ec46db4 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -150,7 +150,7 @@ public class yacysearch {
hostName += ":" + env.getConfig("port", "8090");
}
prop.put("searchBaseURL", "http://" + hostName + "/yacysearch.html");
- prop.put("rssYacyImageURL", "http://" + hostName + "/env/grafics/yacy.gif");
+ prop.put("rssYacyImageURL", "http://" + hostName + "/env/grafics/yacy.png");
prop.put("thisaddress", hostName);
final boolean clustersearch = sb.isRobinsonMode() && sb.getConfig(SwitchboardConstants.CLUSTER_MODE, "").equals(SwitchboardConstants.CLUSTER_MODE_PUBLIC_CLUSTER);
final boolean indexReceiveGranted = sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_ALLOW_SEARCH, true) || clustersearch;
diff --git a/htroot/yacysearchitem.atom b/htroot/yacysearchitem.atom
new file mode 100644
index 000000000..f75f3f73c
--- /dev/null
+++ b/htroot/yacysearchitem.atom
@@ -0,0 +1,11 @@
+#(content)#::<entry>
+<title type="html">#[title-xml]#</title>
+<link href="#[link]#" />
+<summary type="html">#[description-xml]#</summary>
+<updated>#[date822]#</updated>
+<dc:publisher><![CDATA[#[publisher]#]]></dc:publisher>
+<author><name><![CDATA[#[creator]#]]></name></author>
+<dc:subject><![CDATA[#[subject]#]]></dc:subject>
+<id>#[urlhash]#</id>
+</entry>
+#(/content)#
\ No newline at end of file