From 2c9e88dae13e6628f0d8eea2301b3059366d9000 Mon Sep 17 00:00:00 2001 From: Bradley Sepos Date: Mon, 11 Apr 2016 12:05:43 -0400 Subject: [PATCH] build: Improve author identification and formatting. Allow email address appended to name in order to create a more unique identifier. The email portion is stripped during conversion from Markdown to HTML. Authors may now use the following format in replace of a simple name, if desired: Jane Doe The list of authors is now automatically pretty printed: Jane Doe, John Doe, and Other Doe --- build-docs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build-docs b/build-docs index 7896917d..56ee67cf 100755 --- a/build-docs +++ b/build-docs @@ -80,6 +80,13 @@ function build_source { eval $(parse_yaml "${DEST}.yaml" "DOCUMENT_") fi + # process authors + DOCUMENT_Authors=$(echo "${DOCUMENT_Authors}" | sed -e 's/,[^ ]/, /g' -e 's/[ ]*<[^,]*>//g' -e 's/\(.*\), /\1, and /') + DELIM_NUM=$(grep -o ',' <<< "${DOCUMENT_Authors}" | wc -l) + if [[ "${DELIM_NUM}" -eq 1 ]]; then + DOCUMENT_Authors=$(echo "${DOCUMENT_Authors}" | sed -e 's/,//') + fi + # preprocess markdown to add implicit figures sed -E \ -e 's|^!\[(.+)]\([ ]*(.+)[ ]*"(.+)"[ ]*\)$|
\1
\3
|' \