make search result also avail. as atom feed via /yacysearch.atom

- fix logo in rss feed
pull/1/head
reger 11 years ago
parent 59160984cc
commit ba5a59a28d

@ -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)#

@ -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>

@ -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;

@ -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)#
Loading…
Cancel
Save