Changeset 30871

Show
Ignore:
Timestamp:
03/05/09 22:31:14 (4 years ago)
Author:
yasuyuki
Message:

コメント密度ランキングを追加

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • config/pragger/yasuyuki/template.rhtml

    r30157 r30871  
    55    <link rel="alternate" type="application/rss+xml" title="ニコニコ動画 タグ「<%=Erubis::XmlHelper.escape_xml config['tag_name'] %>」新着動画" href="<%= config['new_arrival_feed_url'] %>"> 
    66                <title>ニコニコ動画 タグ 「<%=Erubis::XmlHelper.escape_xml config['tag_name'] %>」 
    7     <%- if group_id == 0 then -%>マイリスト率<%- else -%>コメント率<%- end -%>ランキング(β1)</title> 
     7    <%- if group_id == 0 then -%>マイリスト率<%- elsif group_id == 1 -%>コメント率<% else %>コメント密度<%- end -%>ランキング(β1)</title> 
    88        </head> 
    99        <body> 
     
    1111        <h1><a href="http://www.nicovideo.jp/">ニコニコ動画</a> タグ 
    1212  「<a href="http://www.nicovideo.jp/tag/<%= CGI.escape config['tag_name'] %>"><%=Erubis::XmlHelper.escape_xml config['tag_name'] %></a>」 
    13   <%- if group_id == 0 then -%>マイリスト率<%- else -%>コメント率<%- end -%>ランキング(β1)</h1> 
     13  <%- if group_id == 0 then -%>マイリスト率<%- elsif group_id == 1 -%>コメント率<% else %>コメント密度<%- end -%>ランキング(β1)</h1> 
    1414        このランキングは、アップロードされてから約24時間以内のマイリスト登録率/コメント率を元に生成されています。このアイデアを考え出した<a href="http://www.nicovideo.jp/tag/%E7%A7%8B%E6%9C%88%E7%8E%87%E5%AD%90P">秋月率子P</a>、そして、動画を見て、マイリストに登録してくれたすべての方に感謝します。<br/> 
    1515        <a href="http://webgames.jp:3000/projects/nicolist-rank/boards">バグ報告・機能要望はこちらへ</a> 
     
    1818                <a href="<%= today_root %>1.html">マイリスト率</a>(<a href="<%= config['host'] + config['root_dir'] %>">最新</a>) | 
    1919                <a href="<%= today_root %>4.html">コメント率</a>(<a href="<%= config['host'] + config['root_dir'] %>comment.html">最新</a>) 
     20                <a href="<%= today_root %>7.html">コメント密度</a>(<a href="<%= config['host'] + config['root_dir'] %>comment_density.html">最新</a>) 
    2021  </div> 
    2122        <div> 
     
    3839    コメント率:<%= sprintf "%4.2f", (item['viewed'] == 0 ? 0 : item['comment_num'] / item['viewed']) * 100 %>% 
    3940    マイリスト率:<%= sprintf "%4.2f", (item['viewed'] == 0 ? 0 : item['mylisted'] / item['viewed']) * 100 %>% 
     41    コメント密度:<%= sprintf "%4.2f", (item['viewed'] == 0 ? 0 : item['comment_num'] / (item['viewed'] * (item['length_sec'] + 30))) * 10000 %> 
    4042  </div> 
    4143        <iframe width="760" height="160" src="http://www.nicovideo.jp/thumb/<%= item['link'].scan(/\/([^\/]+)$/)[0] %>" scrolling="no" style="border:solid 1px #CCC;" frameborder="0"></iframe>