Changeset 6787 for platform/pragger
- Timestamp:
- 02/17/08 02:05:07 (5 years ago)
- Location:
- platform/pragger
- Files:
-
- 4 modified
-
Feed/nicovideo_feed.rb (modified) (4 diffs)
-
Feed/nicovideo_rank.rb (modified) (1 diff)
-
Publish/nicorank_save_daily.rb (modified) (1 diff)
-
Publish/nicovideo_rank.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
platform/pragger/Feed/nicovideo_feed.rb
r6769 r6787 24 24 begin 25 25 if config['cache'] then 26 open( config['cache'] ) {|f| items = Marshal.load( f ) }26 open( config['cache'] ) {|f| items = YAML.load( f ) } 27 27 end 28 28 rescue Errno::ENOENT … … 57 57 if thumb then 58 58 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/>" 60 60 else 61 61 item.title = (v / 'p.TXT12 a').first.inner_html … … 73 73 cache_items = (items.size > 1200) ? items.reject {|a, b| b.link.scan(/\d+$/)[0].to_i < oldest_cache_item} : items.dup 74 74 open( config['cache'], 'w' ) do |f| 75 f.write(Marshal.dump(cache_items))75 YAML.dump(cache_items, f) 76 76 end 77 77 end … … 81 81 end 82 82 open( "#{config['rank']}.last_fetched", 'w' ) do |f| 83 f.write(Marshal.dump(updated_at))83 YAML.dump(updated_at, f) 84 84 end 85 85 end -
platform/pragger/Feed/nicovideo_rank.rb
r6534 r6787 22 22 rank_items = [] 23 23 24 open( "#{config['rank_data']}.last_fetched" ) {|f| last_fetched = Marshal.load( f ) }24 open( "#{config['rank_data']}.last_fetched" ) {|f| last_fetched = YAML.load( f ) } 25 25 FileUtils.mkpath(config['root_dir'] + last_fetched.strftime("/%Y/%m/%d")) 26 26 open( "#{config['rank_data']}.dump" ) {|f| raw_items = YAML.load( f ) } -
platform/pragger/Publish/nicorank_save_daily.rb
r6534 r6787 13 13 begin 14 14 if config['rank'] then 15 open( "#{config['fetch_date']}" ) {|f| now = Marshal.load( f ) }15 open( "#{config['fetch_date']}" ) {|f| now = YAML.load( f ) } 16 16 end 17 17 rescue Errno::ENOENT -
platform/pragger/Publish/nicovideo_rank.rb
r6643 r6787 18 18 begin 19 19 if config['rank'] then 20 open( "#{config['fetch_date']}" ) {|f| now = Marshal.load( f ) }20 open( "#{config['fetch_date']}" ) {|f| now = YAML.load( f ) } 21 21 end 22 22 rescue Errno::ENOENT
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)