<commit_before><% content_for :head, auto_discovery_link_tag(:rss, "/user/#{@user.id}/bookmarks.rss") %>

<h1>Profile of <%= @user.username %></h1>
<div id=user-wrapper>
  <div id=userpic-wrapper><span>
      <%= @user.provider == "twitter" ? (image_tag @user.pic_url) : (image_tag avatar_url(@user, img_size=160)) %>
  </span></div>
  <div id=username-wrapper><span class=username>Full Name: </spon><span><%= @user.fullname %></span></div>
  <div id=view-bookmarks><span class="profile-fullname"><a href="/bookmarks/user/<%= @user.id %>">View bookmarks</a></span></div>
  <div id=userweb-wrapper><span class=userweb>Primary website: </spon><span><a href="<%= @user.website %>">website</a></span></div>
</div>
<p />
<hr />
<p />

<h2>Add a bookmarklet to browser</h2>
<p>
Drag the following shortcut to your browser bookmark bar for a shortcut to
bookmark the current page:
<p />

<span class=bookmarklet>
<a href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent(window.getSelection());open('http://bkmark.me/bookmarklet?action=add&popup=1&address='+a+'&title='+t+'&description='+d,'Bkmark.me%20Bookmarks','modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=730,height=465,left='+(screen.width-730)/2+',top='+(screen.height-425)/2);void%200;">Post
  to Bookmarks</a>
</span>


<p />
<hr />
<p />

<h2>Recent Public Bookmarks</h2>
<% @bookmarks.each do |b| %>
  <a href="<%= b.url %>"><%= b.title %></a><br />

<% end %>

<p />
<hr />
<p />
<h2>Popular Tags</h2>
<% @tags.each do |k,v| %>
<a href=""><%= "#{k} (#{v})" %></a><br />
<% end %>

<p />
<hr />
<p />
<% if @user.id == session[:user_id] %>
  <h2>Import Bookmarks</h2>
  Import bookmarks from delicious or pinboard using V1 of the del.ico.us API
  <p>
    <a href="/api/upload">Upload import xml file</a>
  </p>
  <h2>Export Bookmarks</h2>
  <a href="/api/posts/all.xml">Download all posts in an xml file</a>

  <p />
  <h2>Authentication Token</h2>
  Cut and paste this into mobile app:<br>
  <%= @user.api_token %>
  <p />
  <a href="/user/regenerate_token">Regenerate token</a>
  <p />
  <hr />
  <p />
  <%= link_to 'Edit', edit_user_path(@user) %> |
<% end %>
<%= link_to 'Back', users_path %><commit_msg>Updates profile page to display user id<commit_after><% content_for :head, auto_discovery_link_tag(:rss, "/user/#{@user.id}/bookmarks.rss") %>

<h1>Profile of <%= @user.username %></h1>
<div id=user-wrapper>
  <div id=userpic-wrapper><span>
      <%= @user.provider == "twitter" ? (image_tag @user.pic_url) : (image_tag avatar_url(@user, img_size=160)) %>
  </span></div>
  <div id=username-wrapper><span class=username>Full Name: </spon><span><%= @user.fullname %></span></div>
  <div id=view-bookmarks><span class="profile-fullname"><a href="/bookmarks/user/<%= @user.id %>">View bookmarks</a></span></div>
  <div id=userweb-wrapper><span class=userweb>Primary website: </spon><span><a href="<%= @user.website %>">website</a></span></div>
</div>
<p />
<hr />
<p />

<h2>Add a bookmarklet to browser</h2>
<p>
Drag the following shortcut to your browser bookmark bar for a shortcut to
bookmark the current page:
<p />

<span class=bookmarklet>
<a href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent(window.getSelection());open('http://bkmark.me/bookmarklet?action=add&popup=1&address='+a+'&title='+t+'&description='+d,'Bkmark.me%20Bookmarks','modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=730,height=465,left='+(screen.width-730)/2+',top='+(screen.height-425)/2);void%200;">Post
  to Bookmarks</a>
</span>


<p />
<hr />
<p />

<h2>Recent Public Bookmarks</h2>
<% @bookmarks.each do |b| %>
  <a href="<%= b.url %>"><%= b.title %></a><br />

<% end %>

<p />
<hr />
<p />
<h2>Popular Tags</h2>
<% @tags.each do |k,v| %>
<a href=""><%= "#{k} (#{v})" %></a><br />
<% end %>

<p />
<hr />
<p />
<% if @user.id == session[:user_id] %>
  <h2>Import Bookmarks</h2>
  Import bookmarks from delicious or pinboard using V1 of the del.ico.us API
  <p>
    <a href="/api/upload">Upload import xml file</a>
  </p>
  <h2>Export Bookmarks</h2>
  <a href="/api/posts/all.xml">Download all posts in an xml file</a>

  <p />
  <h2>Authentication Token</h2>
  User ID: <%= @user.id %><br>
  API Token: <%= @user.api_token %>
  <p />
  <a href="/user/regenerate_token">Regenerate token</a>
  <p />
  <hr />
  <p />
  <%= link_to 'Edit', edit_user_path(@user) %> |
<% end %>
<%= link_to 'Back', users_path %>
{'fraction_non_alphanumeric': 0.23456241670368724, 'fraction_numerical': 0.019102621057307864, 'mean_word_length': 4.848051948051948, 'pattern_counts': {'":': 0, '<': 196, '<?xml version=': 0, '>': 196, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '899422', 'n_tokens_mistral': 1859, 'n_tokens_neox': 1758, 'n_words': 343}