Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Considering the <a href="http://developer.github.com/v3/users/" rel="nofollow noreferrer">GitHub API for Users</a> doesn't yet expose that particular information (number of days for current stream of contributions), you might have to:</p> <ul> <li><p>scrape it (extract it by reading the user's GitHub page)<br> As <a href="https://stackoverflow.com/users/150552/klamping">klamping</a> mentions in <a href="https://stackoverflow.com/a/18008037/6309">his answer</a> (upvoted), the url to scrap would be:<br> <del><code>https://github.com/users/&lt;username&gt;/contributions_calendar_data</code></del><br> <strong><code>https://github.com/users/&lt;username&gt;/contributions</code></strong><br> (for public repos only, though) </p> <p><a href="https://stackoverflow.com/users/5567941/sherlockstd">SherlockStd</a> has an <a href="https://stackoverflow.com/a/44007340/6309">updated (May 2017) parsing code</a> below:</p> <pre><code>https://github-stats.com/api/user/streak/current/:username </code></pre></li> <li><p>try projects which are using <code>https://github.com/users/&lt;username&gt;/contributions</code><del><code>_calendar_data</code></del> (as listed in <a href="https://stackoverflow.com/users/156674/marques-johansson">Marques Johansson</a>'s <a href="https://stackoverflow.com/a/24802507/6309">answer</a>, upvoted)</p> <ul> <li><a href="https://github.com/IonicaBizau/git-stats" rel="nofollow noreferrer"><strong>IonicaBizau/git-stats</strong></a>:</li> </ul></li> </ul> <p><img src="https://i.stack.imgur.com/7ff9b.png" alt="git-stats"></p> <ul> <li><a href="https://github.com/akerl/githubchart" rel="nofollow noreferrer">akerl/githubchart</a> (Github contribution SVG generator)</li> <li><a href="https://github.com/akerl/githubstats" rel="nofollow noreferrer">akerl/githubstats</a> (Github contribution statistics)</li> </ul> <p><img src="https://i.stack.imgur.com/ElvLA.png" alt="https://github.com/akerl/githubchart"></p> <ul> <li>build that graph yourself: see the <a href="https://github.com/k4rthik/git-cal" rel="nofollow noreferrer"><strong>GitHub project git-cal</strong></a> </li> </ul> <p><img src="https://i.stack.imgur.com/QAAvm.png" alt="https://raw.github.com/k4rthik/git-cal/master/screenshots/img1.png"></p> <blockquote> <p><code>git-cal</code> is a simple script to view commits calendar (similar to GitHub contributions calendar) on command line.<br> Each block in the graph corresponds to a day and is shaded with one of the 5 possible colors, each representing relative number of commits on that day.</p> </blockquote> <ul> <li>or establish a service that will report, each day, any new commit for that given day to a Google Calendar (using the Google Calendar API through a project like <a href="https://github.com/nf/streak" rel="nofollow noreferrer"><strong>nf/streak</strong></a>).<br> You can then read that information and report it in your blog.</li> </ul> <p><img src="https://i.stack.imgur.com/dsLuS.png" alt="Google Calendar streak"></p> <hr> <p>You can find various example of scraping that information:</p> <ul> <li><a href="https://github.com/bigsnarfdude/github_team_calendars/blob/master/github_team_calendar.py" rel="nofollow noreferrer"><code>github_team_calendar.py</code></a></li> <li><a href="https://gist.github.com/remy/4654404" rel="nofollow noreferrer"><code>weekend-commits.js</code></a></li> </ul> <p>As in:</p> <pre><code>$.getJSON('https://github.com/users/' + location.pathname.replace(/\//g, '') + '/contributions_calendar_data', weekendWork); </code></pre> <ul> <li><a href="https://gist.github.com/hecticjeff/4518181" rel="nofollow noreferrer"><code>leaderboard.rb</code></a>:</li> </ul> <p>Like:</p> <pre><code>leaderboard = members.map do |u| user_stats = get("https://github.com/users/#{u}/contributions_calendar_data") total = user_stats.map { |s| s[1] }.reduce(&amp;:+) [u, total] end </code></pre> <ul> <li>... (you get the idea)</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload