aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2004-03-21-syndic8-ruby-0-1-0.html
blob: 804144bdadc1be07e4cfaf28c486748ca827ad96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
date: "2004-03-21T09:33:44Z"
title: Syndic8-Ruby 0.1.0
---

<p>
Here's a set of quick <a href='http://www.ruby-lang.org/'>Ruby</a>
bindings for <a href='http://www.syndic8.com/'>Syndic8.com</a> (via
<acronym title='eXtended Markup Language'>XML</acronym>-<acronym
title='Remote Procedure Call'>RPC</acronym>). Using these bindings is dirt simple; here's some sample code:
</p>

<blockquote>
<pre>
require 'syndic8'
search_str = 'cooking'

begin
  s = Syndic8.new
  s.find(search_str).each { |feed| p feed }
rescue
  puts "Error: #$!"
end
</pre>
</blockquote>

<p>
You can also run Syndic8-Ruby from the command-line.  Here's an example: 
</p>

<blockquote>
<code>
$ ruby ./syndic8.rb bread | head -4<br />
"Andy's Spot (BlackCat)","http://blackcat.editthispage.com/xml/rss.xml"<br />
"ANN.lu","http://www.ann.lu/ANN.rdf"<br />
"bread, coffee, chocolate, yoga","http://home.earthlink.net/~frelkins/blogger_rss.xml"<br />
"Breadcrumbs","http://ovocyte.tripod.com/crumbs/crumbs_rss.xml"<br />
"Bring your best, I can take it","http://www.livejournal.com/users/wonderbreadjn/data/rss"<br />
</code>
</blockquote>

<p>
Syndic8-Ruby: <a
href='/download/syndic8-ruby-0.1.0.tar.gz'>tarball</a>, <a
href='/download/syndic8-ruby-0.1.0.tar.gz.asc'>signature</a>.
</p>