From c440cbfbb974218f6c97fa9a7d3ef646a61d50fb Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 13 Mar 2014 00:33:34 -0400 Subject: [PATCH] news-fmt script now outputs author and date --- tools/news-fmt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/news-fmt b/tools/news-fmt index 5062e52..d3cee40 100755 --- a/tools/news-fmt +++ b/tools/news-fmt @@ -37,16 +37,16 @@ function escprint( str ) /^commit / { next } # store author -match( $0, /^Author: *([^<]+)/, author ) { next } +match( $0, /^Author: *([^<]+)/, a ) { author = a[1]; next } # 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 # occupying the first paragraph (that is---until an empty line) /^ / { # begin the subject line output - printf "

" + printf "

" do { escprint( $0 " " ) @@ -55,6 +55,11 @@ match( $0, /^Date: *(.+)$/, date ) { next } # close subject line printf "

" + # author + printf "
%s
", author + # date + printf "
%s
", date + # the rest of the commit (that is, until we find a line with # non-whitespace in column one) is the body printf "
"