Sha256: 86f5717763cc3f4cbe6c9dba4cd1c279da06b939828bb1f3ec4666d5a06a9611
Contents?: true
Size: 948 Bytes
Versions: 46
Compression:
Stored size: 948 Bytes
Contents
# # makerss_category.rb: extension for makerss plugin. # # Copyright (C) 2007 by SHIBATA Hiroshi <h-sbt@nifty.com> # Distributed under GPL2. # # Usage: # @conf['makerss.category'] = ["mixi", "sns"] # class MakeRssCategory < MakeRssFull def title '(category only)' end def item( seq, body, rdfsec ) return unless rdfsec.section.respond_to?( :body_to_html ) return if rdfsec.section.categories.length == 0 rdfsec.section.categories.each do |category| if @conf['makerss.category'].include?(category) super end end end def file f = @conf['makerss.category.file'] || 'category.rdf' f = 'category.rdf' if f.length == 0 f =~ %r|^/| ? f : "#{document_root}/#{f}" end def write( encoder ) super( encoder ) end def url u = @conf['makerss.category.url'] || "#{@conf.base_url}category.rdf" u = "#{@conf.base_url}category.rdf" if u.length == 0 u end end @makerss_rsses << MakeRssCategory::new( @conf, @cgi )
Version data entries
46 entries across 40 versions & 2 rubygems