Created
October 11, 2009 12:26
-
-
Save mzp/207650 to your computer and use it in GitHub Desktop.
git blog: generate blog template from git repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# | |
# git blog: generate blog template from git repository | |
# | |
# Usage: | |
# $ git blog > diary.txt | |
# | |
# and upload diary.txt by some methods. | |
# | |
commits = %x(git log --pretty=oneline --since=1.day).map do|line| | |
line.split(' ',2) | |
end.reverse | |
today = Time.now | |
# format | |
github = commits.map do|rev,msg| | |
"|[http://github.com/mzp/scheme-abc/commit/#{rev}:title=#{rev}]|#{msg.chop}\ | |
|\n" | |
end | |
puts <<END | |
#{today.strftime "%Y-%m-%d:"} | |
*log*[進捗]本日の作業履歴 | |
** 要約 | |
______ | |
** 本日のコミット | |
#{github} | |
END | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment