Show
Ignore:
Timestamp:
02/17/08 02:05:07 (5 years ago)
Author:
yasuyuki
Message:

platform/pragger: change file format to yaml.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/pragger/Feed/nicovideo_feed.rb

    r6769 r6787  
    2424        begin 
    2525                if config['cache'] then 
    26                         open( config['cache'] ) {|f| items = Marshal.load( f ) } 
     26                        open( config['cache'] ) {|f| items = YAML.load( f ) } 
    2727                end 
    2828        rescue Errno::ENOENT 
     
    5757                        if thumb then 
    5858                                item.title = thumb['alt'] 
    59                                 item.description = "<img src=\"#{thumb['src']}\"/><br/>" 
     59                                item.description = "<a href=\"#{key}\"><img border=\"0\" src=\"#{thumb['src']}\"/></a><br/>" 
    6060                        else 
    6161                                item.title = (v / 'p.TXT12 a').first.inner_html 
     
    7373                cache_items = (items.size > 1200) ? items.reject {|a, b| b.link.scan(/\d+$/)[0].to_i < oldest_cache_item} : items.dup 
    7474                open( config['cache'], 'w' ) do |f| 
    75                         f.write(Marshal.dump(cache_items)) 
     75                        YAML.dump(cache_items, f) 
    7676                end 
    7777        end 
     
    8181                end 
    8282                open( "#{config['rank']}.last_fetched", 'w' ) do |f| 
    83                         f.write(Marshal.dump(updated_at)) 
     83                        YAML.dump(updated_at, f) 
    8484                end 
    8585        end