{"type":"rich","version":"1.0","provider_name":"phorkie","provider_url":"https:\/\/p.cweiske.de\/","title":"graph of number of git commits by month in terminal","author_name":"Christian Weiske","cache_age":86400,"width":900,"height":900,"html":"<!-- embedding all files of https:\/\/p.cweiske.de\/983 -->\n<link rel=\"stylesheet\" href=\"https:\/\/p.cweiske.de\/css\/embed.css\"\/>\n<div class=\"phork\" id=\"983\">\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  \n<div class=\"document\">\n\n\n<p>Single repository:<\/p>\n<pre class=\"literal-block\">\ngit log --pretty=format:%cs | cut -b 1-7|sort | uniq -c | add-missing-months  | awk '{print $1}' | spark\n<\/pre>\n<p>Multiple repositories:<\/p>\n<pre class=\"literal-block\">\nfor d in *\/; do cd $d; basename $(pwd); git log --pretty=format:%cs | cut -b 1-7|sort | uniq -c | add-missing-months  | awk '{print $1}' | spark; cd ..\/; done\n<\/pre>\n<div class=\"section\" id=\"links\">\n<h1>Links<\/h1>\n<ul class=\"simple\">\n<li>spark: <a class=\"reference external\" href=\"https:\/\/github.com\/holman\/spark\">https:\/\/github.com\/holman\/spark<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/983\/rev-raw\/12086e98ed05a8dab78ac5e70250ecec98508ef8\/README.rst\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/983#README.rst\">README.rst<\/a>\n <\/div>\n<\/div>\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  <style type=\"text\/css\">\/**\n * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2014 Benny Baumann\n * (http:\/\/qbnz.com\/highlighter\/ and http:\/\/geshi.org\/)\n *\/\n.bash .de1, .bash .de2 {font: normal normal 1em\/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}\n.bash  {font-family:monospace;}\n.bash .imp {font-weight: bold; color: red;}\n.bash li, .bash .li1 {color: #DDD;}\n.bash .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}\n.bash .kw1 {color: #000000; font-weight: bold;}\n.bash .kw2 {color: #c20cb9; font-weight: bold;}\n.bash .kw3 {color: #7a0874; font-weight: bold;}\n.bash .co0 {color: #666666; font-style: italic;}\n.bash .co1 {color: #800000;}\n.bash .co2 {color: #cc0000; font-style: italic;}\n.bash .co3 {color: #000000; font-weight: bold;}\n.bash .co4 {color: #666666;}\n.bash .es1 {color: #000099; font-weight: bold;}\n.bash .es2 {color: #007800;}\n.bash .es3 {color: #007800;}\n.bash .es4 {color: #007800;}\n.bash .es5 {color: #780078;}\n.bash .es_h {color: #000099; font-weight: bold;}\n.bash .br0 {color: #7a0874; font-weight: bold;}\n.bash .sy0 {color: #000000; font-weight: bold;}\n.bash .st0 {color: #ff0000;}\n.bash .st_h {color: #ff0000;}\n.bash .nu0 {color: #000000;}\n.bash .re0 {color: #007800;}\n.bash .re1 {color: #007800;}\n.bash .re2 {color: #007800;}\n.bash .re4 {color: #007800;}\n.bash .re5 {color: #660033;}\n.bash span.xtra { display:block; }\n<\/style><div class=\"code\"><table class=\"bash\"><tbody><tr class=\"li1\"><td class=\"ln\"><pre class=\"de1\">1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n<\/pre><\/td><td class=\"de1\"><pre class=\"de1\"><span class=\"co0\">#!\/bin\/sh<\/span>\n<span class=\"kw2\">awk<\/span> <span class=\"re5\">-v<\/span> <span class=\"re2\">start<\/span>=<span class=\"nu0\">2016<\/span>-01 <span class=\"re5\">-v<\/span> <span class=\"re2\">now<\/span>=<span class=\"st0\">&quot;<span class=\"es4\">$(date +%Y-%m)<\/span>&quot;<\/span> <span class=\"st_h\">'{ c[$2] = $1 }<\/span>\n<span class=\"st_h\">END {<\/span>\n<span class=\"st_h\"> &#160;split(start, a, &quot;-&quot;); split(now, b, &quot;-&quot;)<\/span>\n<span class=\"st_h\"> &#160;y = a[1] + 0; m = a[2] + 0; ey = b[1] + 0; em = b[2] + 0<\/span>\n<span class=\"st_h\"> &#160;while (y &lt; ey || (y == ey &amp;&amp; m &lt;= em)) {<\/span>\n<span class=\"st_h\"> &#160; &#160;k = sprintf(&quot;%04d-%02d&quot;, y, m)<\/span>\n<span class=\"st_h\"> &#160; &#160;printf &quot;%7d %s\\n&quot;, c[k] + 0, k<\/span>\n<span class=\"st_h\"> &#160; &#160;if (++m &gt; 12) { m = 1; y++ }<\/span>\n<span class=\"st_h\"> &#160;}<\/span>\n<span class=\"st_h\">}'<\/span>\n&#160;<\/pre><\/td><\/tr><\/tbody><\/table><\/div>\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/983\/rev-raw\/12086e98ed05a8dab78ac5e70250ecec98508ef8\/add-missing-months.sh\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/983#add-missing-months.sh\">add-missing-months.sh<\/a>\n <\/div>\n<\/div>\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  <div class=\"code\"><pre class=\"txt\">git-repo1\r\n\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2583\u2581\u2581\u2586\u2588\u2586\u2586\u2582\u2583\u2581\u2582\u2582\u2582\u2584\u2584\u2582\u2584\u2581\u2581\u2581\u2581\u2581\u2581\u2585\u2588\u2581\u2583\u2582\u2582\u2581\u2582\u2581\u2583\u2582\u2584\u2581\u2581\u2583\u2582\u2582\u2582\u2581\u2581\u2582\u2588\u2581\u2581\r\n\r\ngit-repo2\r\n\u2584\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2583\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2584\u2586\u2582\u2581\u2581\u2583\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2583\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\r\n\r\ngit-repo3\r\n\u2581\u2581\u2582\u2582\u2583\u2583\u2583\u2588\u2587\u2581\u2581\u2582\u2585\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2582\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\r\n\r\ngit-repo4\r\n\u2584\u2582\u2582\u2581\u2581\u2581\u2581\u2581\u2582\u2584\u2582\u2584\u2583\u2583\u2584\u2585\u2583\u2584\u2582\u2584\u2582\u2586\u2584\u2584\u2584\u2582\u2584\u2582\u2582\u2582\u2581\u2582\u2582\u2582\u2583\u2582\u2582\u2581\u2584\u2582\u2583\u2582\u2582\u2582\u2582\u2581\u2582\u2582\u2581\u2581\u2581\u2582\u2582\u2586\u2586\u2583\u2583\u2581\u2582\r\n<\/pre><\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/983\/rev-raw\/12086e98ed05a8dab78ac5e70250ecec98508ef8\/output.txt\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/983#output.txt\">output.txt<\/a>\n <\/div>\n<\/div>\n<\/div>\n"}
