ExtractSbmTags
ExtractSbmTags is RSS::RDF::Item class adds on. This method is return array of tags using social bookmark service.
This method currently supports below services.
-
del.icio.us : del.icio.us
-
Hatena Bookmark : b.hatena.ne.jp
-
MM/Memo : 1470.net/mm/
Installation
$ sudo gem install extract_sbm_tags
Usage
require 'rubygems'
require "rss/1.0"
require "rss/2.0"
require "rss/dublincore"
require 'extract_sbm_tags'
content = <<EOS
<?xml version="1.0" encoding="euc-jp" ?>
- <rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="ja">
<channel rdf:about="http://www.example.com/rss">
<title>example.com</title>
<link>http://www.example.com</link>
<description>example</description>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://www.example.com/" />
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://www.example.com/">
<title>example.com</title>
<link>http://www.example.com/</link>
<dc:date>2005-09-22T00:17:47+09:00</dc:date>
<dc:creator>example</dc:creator>
<dc:subject>foo bar</dc:subject>
<dc:subject>com</dc:subject>
</item>
</rdf:RDF>
EOS
rss.(:hatena)
#=> ["foo bar", "com"]
rss.(:delicious)
#=> ["foo", "bar"]
rss.(:mm)
#=> ["foo bar"]
Author
-
gorou ( rails2u.com ) <[email protected]>
-
drawnboy ( nowherenear.net ) <[email protected]>
License
MIT License