quatuorbellefeuille.com

Content, build scripts and admin scripts for the Bellefeuille Quartet website.
git clone https://git.kevinlegouguec.net/quatuorbellefeuille.com
Log | Files | Refs

commit 4c1498735516d4d31432e5d589395dbf7f14f6e6
parent 8a2be973922e1d157867df85fb6463bdf42a17e9
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Wed, 10 Mar 2021 00:09:28 +0100

Format individual bios as Markdown

Diffstat:
Mbuild-member.sh | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/build-member.sh b/build-member.sh @@ -25,6 +25,11 @@ transforms=("\$(transform-li-dropdown-current-a quatuor)" EOF } +pandoc-inline () +{ + pandoc | sed -r 's,^<p>(.+)</p>$,\1,' +} + generate-main () { read fullname @@ -44,15 +49,16 @@ EOF while read line do - if ! [[ ${line} =~ ([^:?]+[:?] )(.+) ]] + # Pasting from GDoc yields trailing spaces; remove those. + if ! [[ ${line} =~ ([^:?]+[:?])\ (.+[^ ])\ * ]] then >&2 echo "Invalid line: ${line}" fi cat <<EOF <dl> - <dt>${BASH_REMATCH[1]}</dt> - <dd>${BASH_REMATCH[2]}</dd> + <dt>$(pandoc-inline <<< "${BASH_REMATCH[1]}") </dt> + <dd>$(pandoc-inline <<< ${BASH_REMATCH[2]})</dd> </dl> EOF done