47
36

More than 5 years have passed since last update.

GitHubの草のSVGをコマンドラインで取得する

Last updated at Posted at 2015-12-09

個人的に対外的なコード書いてるかの指標にGitHubの草、しかもパブリックな状態の草状況を自動で監視したかった(意味不明な文章だ)。

試行錯誤の末、単にシェルのワンライナーでできた

curl https://github.com/mizchi | awk '/<svg.+class="js-calendar-graph-svg"/,/svg>/' | sed -e 's/<svg/<svg xmlns="http:\/\/www.w3.org\/2000\/svg"/' > grass.svg

結果はこんな感じにブラウザやFinderのQuickLookで見れる

Screen Shot 2015-12-10 at 12.03.49 AM.png

47
36
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
47
36