news-fmt script now outputs author and date
parent
ee12a7df5e
commit
c440cbfbb9
|
@ -37,16 +37,16 @@ function escprint( str )
|
||||||
/^commit / { next }
|
/^commit / { next }
|
||||||
|
|
||||||
# store author
|
# store author
|
||||||
match( $0, /^Author: *([^<]+)/, author ) { next }
|
match( $0, /^Author: *([^<]+)/, a ) { author = a[1]; next }
|
||||||
|
|
||||||
# store date
|
# store date
|
||||||
match( $0, /^Date: *(.+)$/, date ) { next }
|
match( $0, /^Date: *[^ ]+ ([^ ]+ [^ ]+ [^ ]+)/, a ) { date = a[1]; next }
|
||||||
|
|
||||||
# commit messages are indented by four spaces, with the subject line
|
# commit messages are indented by four spaces, with the subject line
|
||||||
# occupying the first paragraph (that is---until an empty line)
|
# occupying the first paragraph (that is---until an empty line)
|
||||||
/^ / {
|
/^ / {
|
||||||
# begin the subject line output
|
# begin the subject line output
|
||||||
printf "<h3>"
|
printf "<h3 class=\"git-commit\">"
|
||||||
|
|
||||||
do {
|
do {
|
||||||
escprint( $0 " " )
|
escprint( $0 " " )
|
||||||
|
@ -55,6 +55,11 @@ match( $0, /^Date: *(.+)$/, date ) { next }
|
||||||
# close subject line
|
# close subject line
|
||||||
printf "</h3>"
|
printf "</h3>"
|
||||||
|
|
||||||
|
# author
|
||||||
|
printf "<div class=\"git-commit-author\">%s</div>", author
|
||||||
|
# date
|
||||||
|
printf "<div class=\"git-commit-date\">%s</div>", date
|
||||||
|
|
||||||
# the rest of the commit (that is, until we find a line with
|
# the rest of the commit (that is, until we find a line with
|
||||||
# non-whitespace in column one) is the body
|
# non-whitespace in column one) is the body
|
||||||
printf "<pre>"
|
printf "<pre>"
|
||||||
|
|
Loading…
Reference in New Issue