From 4c1498735516d4d31432e5d589395dbf7f14f6e6 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Wed, 10 Mar 2021 00:09:28 +0100 Subject: Format individual bios as Markdown --- build-member.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'build-member.sh') diff --git a/build-member.sh b/build-member.sh index ed74909..49a9205 100755 --- 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,^

(.+)

$,\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 < -
${BASH_REMATCH[1]}
-
${BASH_REMATCH[2]}
+
$(pandoc-inline <<< "${BASH_REMATCH[1]}")
+
$(pandoc-inline <<< ${BASH_REMATCH[2]})
EOF done -- cgit v1.2.3